Skip to content

Commit 4291f2d

Browse files
committed
another crack at the ESP32 port
1 parent 1513401 commit 4291f2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

micropy_updates/esp32/machine_i2c.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ static const void *_get_func(size_t index)
5555
{
5656
mp_map_elem_t * table = mp_machine_i2c_locals_dict.map.table;
5757
mp_rom_map_elem_t *rom_table = (mp_rom_map_elem_t *)table;
58-
mp_rom_obj_t value = (mp_rom_obj_t)((mp_rom_map_elem_t)rom_table[index]).value;
58+
mp_rom_map_elem_t *elem = &rom_table[index];
5959

60-
if (value.u32.lo == NULL) return value.u32.hi;
61-
else return value.u32.lo;
60+
if (elem->value.u32.lo == NULL) return elem->value.u32.hi;
61+
else return elem->value.u32.lo;
6262
}
6363

6464

0 commit comments

Comments
 (0)