NULL GPIO pin array

This commit is contained in:
servadmin 2021-11-11 18:42:59 -05:00
parent b6faa6571f
commit ba8e0f3170
1 changed files with 3 additions and 0 deletions

View File

@ -49,6 +49,9 @@ void init_i2c_hw(u8g2_t *u8g2, uint8_t bus) {
// Dynamically allocate u8x8_buffer_struct
user_data_t *user_data = (user_data_t*) malloc(sizeof(user_data_t));
user_data->bus = bus;
for (int i = 0; i < U8X8_PIN_CNT; ++i) {
user_data->pins[i] = NULL;
}
u8g2_SetUserPtr(u8g2, user_data);
}