Skip to content

Commit 3d3061f

Browse files
committed
fix qualia board definition
1 parent 1c2362b commit 3d3061f

File tree

1 file changed

+7
-6
lines changed
  • ports/espressif/boards/adafruit_qualia_s3_rgb666

1 file changed

+7
-6
lines changed

ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33

44
#define MP_DEFINE_BYTES_OBJ(obj_name, bin) mp_obj_str_t obj_name = {{&mp_type_bytes}, 0, sizeof(bin) - 1, (const byte *)bin}
55

6-
STATIC MP_DEFINE_BYTES_OBJ(i2c_init_byte_obj,
7-
"\2\2\0" // set data inversion register (no inversions)
8-
"\2\1\xfe" // set output data (CLK idle low, all others high)
9-
"\2\3\x78" // set direction register (cs, mosi, clk, reset as outputs)
10-
);
6+
static const char i2c_bus_init_sequence[] = {
7+
2, 3, 0x78, // set GPIO direction
8+
2, 2, 0, // disable all output inversion
9+
0, // trailing NUL for python bytes() representation
10+
};
11+
STATIC MP_DEFINE_BYTES_OBJ(i2c_init_byte_obj, i2c_bus_init_sequence);
1112

1213
STATIC const mp_rom_map_elem_t tft_io_expander_table[] = {
13-
{ MP_ROM_QSTR(MP_QSTR_i2c_address), MP_ROM_INT(0x38)},
14+
{ MP_ROM_QSTR(MP_QSTR_i2c_address), MP_ROM_INT(0x3f)},
1415
{ MP_ROM_QSTR(MP_QSTR_gpio_address), MP_ROM_INT(1)},
1516
{ MP_ROM_QSTR(MP_QSTR_gpio_data_len), MP_ROM_INT(1)},
1617
{ MP_ROM_QSTR(MP_QSTR_gpio_data), MP_ROM_INT(0xFD)},

0 commit comments

Comments
 (0)