feat(lv_port): Add abstraction for busy signal
This signal can be used when driving eink displays
This commit is contained in:
parent
2006d5e449
commit
3c5a4061d9
2 changed files with 34 additions and 0 deletions
|
@ -39,3 +39,19 @@ void display_port_gpio_rst(lv_disp_drv_t *drv, uint8_t state)
|
|||
gpio_set_level(CONFIG_LV_DISP_PIN_RST, state);
|
||||
#endif
|
||||
}
|
||||
|
||||
display_port_busy_t display_port_gpio_is_busy(lv_disp_drv_t *drv)
|
||||
{
|
||||
(void) drv;
|
||||
|
||||
display_port_busy_t device_busy = DISPLAY_PORT_DEVICE_NOT_BUSY;
|
||||
|
||||
#ifdef CONFIG_LV_DISP_PIN_BUSY
|
||||
/* FIXME Assuming the busy signal in logic 1 means the device is busy */
|
||||
if (gpio_get_level(CONFIG_LV_DISP_PIN_BUSY) == 1) {
|
||||
device_busy = DISPLAY_PORT_DEVICE_IS_BUSY;
|
||||
}
|
||||
#endif
|
||||
|
||||
return device_busy;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue