allocate_display_bus: fix bug where in-use bus would be returned
This commit is contained in:
parent
a28d0f6c80
commit
1ccd2e234f
@ -398,7 +398,7 @@ primary_display_t *allocate_display_or_raise(void) {
|
||||
}
|
||||
primary_display_t *allocate_display_bus(void) {
|
||||
for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) {
|
||||
mp_const_obj_t display_type = displays[i].display.base.type;
|
||||
mp_const_obj_t display_type = displays[i].bus_base.type;
|
||||
if (display_type == NULL || display_type == &mp_type_NoneType) {
|
||||
return &displays[i];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user