File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -68,8 +68,8 @@ mp_obj_t common_hal_board_create_i2c(void) {
68
68
69
69
70
70
#if BOARD_SECOND_I2C
71
- // Statically allocate the I2C object so it can live past the end of the heap and into the next VM .
72
- // That way it can be used by built-in I2CDisplay displays and be accessible through board.I2C() .
71
+ // This is the secondary I2C object, for boards that have an additional dedicated I2C port .
72
+ // For example for board.STEMMA_I2C on the QT PY 2040 .
73
73
STATIC busio_i2c_obj_t second_i2c_obj ;
74
74
STATIC mp_obj_t second_i2c_singleton = NULL ;
75
75
@@ -186,6 +186,7 @@ void reset_board_busses(void) {
186
186
}
187
187
#endif
188
188
if (second_i2c_singleton != NULL ) {
189
+ common_hal_busio_i2c_unlock (second_i2c_singleton );
189
190
if (!display_using_second_i2c ) {
190
191
common_hal_busio_i2c_deinit (second_i2c_singleton );
191
192
second_i2c_singleton = NULL ;
You can’t perform that action at this time.
0 commit comments