mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/lcd: assert controller-specific init function
This commit is contained in:
parent
9447f59d59
commit
5c7a9cc966
@ -184,12 +184,9 @@ int lcd_init(lcd_t *dev, const lcd_params_t *params)
|
||||
}
|
||||
ztimer_sleep(ZTIMER_MSEC, 120);
|
||||
|
||||
if (dev->driver->init) {
|
||||
return dev->driver->init(dev, params);
|
||||
}
|
||||
else {
|
||||
return -ENOTSUP;
|
||||
}
|
||||
/* controller-specific init function has to be defined */
|
||||
assert(dev->driver->init);
|
||||
return dev->driver->init(dev, params);
|
||||
}
|
||||
|
||||
void lcd_write_cmd(const lcd_t *dev, uint8_t cmd, const uint8_t *data,
|
||||
|
Loading…
Reference in New Issue
Block a user