|
34 | 34 | #include "shared-bindings/microcontroller/__init__.h"
|
35 | 35 |
|
36 | 36 | /*
|
37 |
| - * |
38 | 37 | * Current pin limitations for ESP32-S2 ParallelBus:
|
39 |
| - * - data0 pin must be byte aligned (data0 pin options: 0, 8, 16 or 24) |
40 |
| - * |
| 38 | + * - data0 pin must be byte aligned |
41 | 39 | */
|
42 | 40 |
|
43 | 41 | void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self,
|
44 | 42 | const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select,
|
45 | 43 | const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset) {
|
46 | 44 |
|
47 | 45 | uint8_t data_pin = data0->number;
|
48 |
| - if ( (data_pin % 8 != 0) && (data_pin >= 32) ) { |
| 46 | + if (data_pin % 8 != 0) { |
49 | 47 | mp_raise_ValueError(translate("Data 0 pin must be byte aligned."));
|
50 | 48 | }
|
51 | 49 |
|
@@ -113,20 +111,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel
|
113 | 111 | }
|
114 | 112 |
|
115 | 113 |
|
116 |
| - mp_printf(&mp_plat_print, "write_clear: %x, write_set: %x\n", self->write_clear_register, self->write_set_register); |
117 |
| - |
118 | 114 | self->write_mask = 1 << (write->number % 32); /* the write pin triggers the LCD to latch the data */
|
119 |
| - mp_printf(&mp_plat_print, "write_mask: %x\n", self->write_mask); |
120 |
| - |
121 |
| - mp_printf(&mp_plat_print, "out1 register: %x\n", g->out1.val); |
122 |
| - mp_printf(&mp_plat_print, "clear a bit\n"); |
123 |
| - *self->write_clear_register = self->write_mask; |
124 |
| - mp_printf(&mp_plat_print, "out1 register: %x\n", g->out1.val); |
125 |
| - mp_printf(&mp_plat_print, "write a bit\n"); |
126 |
| - *self->write_set_register = self->write_mask; |
127 |
| - mp_printf(&mp_plat_print, "out1 register: %x\n", g->out1.val); |
128 |
| - |
129 |
| - *self->write_clear_register = self->write_mask; |
130 | 115 |
|
131 | 116 | /* SNIP - common setup of the reset pin, same as from SAMD and NRF ports */
|
132 | 117 | self->reset.base.type = &mp_type_NoneType;
|
|
0 commit comments