1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/hd44780: fix potential hardfault on initialization

Co-authored-by Benjamin Valentin <benpicco@googlemail.com>
This commit is contained in:
Alexandre Abadie 2019-11-06 16:14:39 +01:00
parent cd298b9c4e
commit c7fac09d42
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -118,6 +118,7 @@ int hd44780_init(hd44780_t *dev, const hd44780_params_t *params)
}
}
/* set mode depending on configured pins */
dev->flag = 0;
if (count_pins < HD44780_MAX_PINS) {
dev->flag |= HD44780_4BITMODE;
}