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:
parent
cd298b9c4e
commit
c7fac09d42
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user