IoT25S IoT Klocka 0.1
Grupparbete för IoT25S på Jensen YH
Loading...
Searching...
No Matches
priv_i2c_u8g2.c File Reference
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_check.h"
#include "esp_log.h"
#include "esp_rom_sys.h"
#include "sdkconfig.h"
#include "priv_i2c_u8g2.h"
+ Include dependency graph for priv_i2c_u8g2.c:

Go to the source code of this file.

Macros

#define I2C_MASTER_NUM   CONFIG_I2C_U8G2_I2C_PORT
 
#define I2C_MASTER_SDA_IO   CONFIG_I2C_U8G2_SDA_GPIO
 
#define I2C_MASTER_SCL_IO   CONFIG_I2C_U8G2_SCL_GPIO
 
#define I2C_FREQ_HZ   CONFIG_I2C_U8G2_FREQ_HZ
 
#define I2C_DISPLAY_ADDRESS   CONFIG_I2C_U8G2_DISPLAY_ADDRESS
 
#define I2C_PROBE_TIMEOUT_MS_MAX   100U
 
#define I2C_INTERNAL_PULLUP   false
 

Functions

static size_t i2c_u8g2_scan_bus (uint8_t *found_addresses, size_t max_found, uint16_t probe_timeout_ms)
 
static void i2c_u8g2_log_scan_results (const uint8_t *found_addresses, size_t stored_count, size_t total_count)
 
static esp_err_t i2c_u8g2_resolve_display_address (uint8_t preferred_address, uint16_t probe_timeout_ms, uint8_t *resolved_address)
 
static i2c_u8g2_handle_t * i2c_u8g2_handle_from_u8x8 (u8x8_t *u8x8)
 
static uint8_t i2c_u8g2_byte_cb (u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
 
static uint8_t i2c_u8g2_gpio_and_delay_cb (u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
 
i2c_u8g2_config_t i2c_u8g2_config_default (void)
 Fill a config with menuconfig-backed defaults.
 
esp_err_t i2c_u8g2_init (i2c_u8g2_handle_t *handle, const i2c_u8g2_config_t *config)
 Initialize I2C bus and U8G2 display.
 
esp_err_t i2c_u8g2_deinit (i2c_u8g2_handle_t *handle)
 Deinitialize display device and I2C bus.
 
u8g2_t * i2c_u8g2_get_u8g2 (i2c_u8g2_handle_t *handle)
 Get the U8G2 object for draw operations.
 
esp_err_t i2c_u8g2_set_power_save (i2c_u8g2_handle_t *handle, bool enable)
 Set display power save mode.
 
void demo_shapes (u8g2_t *u8g2)
 

Variables

static const char * TAG = "i2c_u8g2"
 
static i2c_u8g2_handle_t * s_active_handle = NULL
 
static i2c_master_bus_handle_t s_i2c_bus_handle = NULL
 
static i2c_master_dev_handle_t s_display_dev_handle = NULL
 
static uint32_t s_scl_speed_hz = 0
 
static uint16_t s_timeout_ms = 1000
 
static uint8_t s_device_address = 0x3C
 
static bool s_display_available = false
 

Macro Definition Documentation

◆ I2C_DISPLAY_ADDRESS

#define I2C_DISPLAY_ADDRESS   CONFIG_I2C_U8G2_DISPLAY_ADDRESS

Definition at line 17 of file priv_i2c_u8g2.c.

◆ I2C_FREQ_HZ

#define I2C_FREQ_HZ   CONFIG_I2C_U8G2_FREQ_HZ

Definition at line 16 of file priv_i2c_u8g2.c.

◆ I2C_INTERNAL_PULLUP

#define I2C_INTERNAL_PULLUP   false

Definition at line 23 of file priv_i2c_u8g2.c.

◆ I2C_MASTER_NUM

#define I2C_MASTER_NUM   CONFIG_I2C_U8G2_I2C_PORT

Definition at line 13 of file priv_i2c_u8g2.c.

◆ I2C_MASTER_SCL_IO

#define I2C_MASTER_SCL_IO   CONFIG_I2C_U8G2_SCL_GPIO

Definition at line 15 of file priv_i2c_u8g2.c.

◆ I2C_MASTER_SDA_IO

#define I2C_MASTER_SDA_IO   CONFIG_I2C_U8G2_SDA_GPIO

Definition at line 14 of file priv_i2c_u8g2.c.

◆ I2C_PROBE_TIMEOUT_MS_MAX

#define I2C_PROBE_TIMEOUT_MS_MAX   100U

Definition at line 18 of file priv_i2c_u8g2.c.

Function Documentation

◆ demo_shapes()

void demo_shapes ( u8g2_t *  u8g2)

Definition at line 411 of file priv_i2c_u8g2.c.

412{
413 ESP_LOGI(TAG, "Geometric Shapes");
414
415 u8g2_ClearBuffer(u8g2);
416
417 /* Title */
418 u8g2_SetFont(u8g2, u8g2_font_ncenB08_tr);
419 u8g2_DrawStr(u8g2, 35, 12, "Shapes");
420
421 /* Filled rectangle */
422 u8g2_DrawBox(u8g2, 10, 20, 20, 15);
423
424 /* Outlined rectangle */
425 u8g2_DrawFrame(u8g2, 35, 20, 20, 15);
426
427 /* Circle outline */
428 u8g2_DrawCircle(u8g2, 70, 27, 8, U8G2_DRAW_ALL);
429
430 /* Filled circle */
431 u8g2_DrawDisc(u8g2, 95, 27, 6, U8G2_DRAW_ALL);
432
433 /* Lines */
434 u8g2_DrawLine(u8g2, 10, 45, 50, 45);
435 u8g2_DrawLine(u8g2, 10, 50, 30, 60);
436 u8g2_DrawLine(u8g2, 30, 50, 50, 60);
437
438 /* Triangle */
439 u8g2_DrawTriangle(u8g2, 70, 45, 85, 60, 55, 60);
440
441 u8g2_SendBuffer(u8g2);
442}
static const char * TAG

◆ i2c_u8g2_byte_cb()

static uint8_t i2c_u8g2_byte_cb ( u8x8_t *  u8x8,
uint8_t  msg,
uint8_t  arg_int,
void *  arg_ptr 
)
static

Definition at line 127 of file priv_i2c_u8g2.c.

128{
129 (void)u8x8;
130 static uint8_t buffer[I2C_U8G2_TX_BUFFER_SIZE];
131 static uint8_t buf_idx;
132
133 switch (msg) {
134 case U8X8_MSG_BYTE_INIT: {
135 i2c_device_config_t dev_config = {
136 .dev_addr_length = I2C_ADDR_BIT_LEN_7,
137 .device_address = s_device_address,
138 .scl_speed_hz = s_scl_speed_hz,
139 .scl_wait_us = 0,
140 .flags.disable_ack_check = false,
141 };
142
143 esp_err_t ret = i2c_master_bus_add_device(s_i2c_bus_handle, &dev_config,
145 if (ret != ESP_OK) {
146 ESP_LOGE(TAG, "Failed to add display device to I2C bus (%s)", esp_err_to_name(ret));
147 return 0;
148 }
149
151 if (handle != NULL) {
153 }
154
155 ESP_LOGI(TAG, "I2C master driver initialized successfully");
156 break;
157 }
158
159 case U8X8_MSG_BYTE_START_TRANSFER:
160 buf_idx = 0;
161 break;
162
163 case U8X8_MSG_BYTE_SET_DC:
164 break;
165
166 case U8X8_MSG_BYTE_SEND:
167 for (size_t i = 0; i < arg_int; ++i) {
168 if (buf_idx >= sizeof(buffer)) {
169 ESP_LOGE(TAG, "U8G2 transfer buffer overflow (%u >= %u)",
170 (unsigned int)buf_idx,
171 (unsigned int)sizeof(buffer));
172 return 0;
173 }
174 buffer[buf_idx++] = *((uint8_t *)arg_ptr + i);
175 }
176 break;
177
178 case U8X8_MSG_BYTE_END_TRANSFER:
179 if (buf_idx > 0 && s_display_dev_handle != NULL) {
180 if (!s_display_available) {
181 return 1;
182 }
183
184 esp_err_t ret = i2c_master_transmit(s_display_dev_handle, buffer, buf_idx, s_timeout_ms);
185 if (ret != ESP_OK) {
186 s_display_available = false;
187 ESP_LOGW(TAG, "Display I2C transfer failed, suppressing further updates (%s)",
188 esp_err_to_name(ret));
189 return 1;
190 }
191 }
192 break;
193
194 default:
195 return 0;
196 }
197
198 return 1;
199}
static bool s_display_available
static i2c_master_dev_handle_t s_display_dev_handle
static uint8_t s_device_address
static i2c_u8g2_handle_t * i2c_u8g2_handle_from_u8x8(u8x8_t *u8x8)
static uint16_t s_timeout_ms
static uint32_t s_scl_speed_hz
static i2c_master_bus_handle_t s_i2c_bus_handle
#define I2C_U8G2_TX_BUFFER_SIZE
Display handle containing runtime driver state.
i2c_master_dev_handle_t display_dev_handle
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ i2c_u8g2_config_default()

i2c_u8g2_config_t i2c_u8g2_config_default ( void  )

Fill a config with menuconfig-backed defaults.

Definition at line 241 of file priv_i2c_u8g2.c.

242{
243 i2c_u8g2_config_t config = {
244 .i2c_port = (i2c_port_num_t)I2C_MASTER_NUM,
245 .sda_io_num = (gpio_num_t)I2C_MASTER_SDA_IO,
246 .scl_io_num = (gpio_num_t)I2C_MASTER_SCL_IO,
247 .scl_speed_hz = I2C_FREQ_HZ,
248 .timeout_ms = CONFIG_I2C_U8G2_TIMEOUT_MS,
249 .device_address = I2C_DISPLAY_ADDRESS,
250 .enable_internal_pullup = I2C_INTERNAL_PULLUP,
251 .rotation = U8G2_R0,
252 .setup_fn = NULL,
253 };
254 return config;
255}
#define CONFIG_I2C_U8G2_TIMEOUT_MS
Definition sdkconfig.h:774
#define I2C_MASTER_SCL_IO
#define I2C_FREQ_HZ
#define I2C_INTERNAL_PULLUP
#define I2C_MASTER_NUM
#define I2C_DISPLAY_ADDRESS
#define I2C_MASTER_SDA_IO
Configuration for I2C-backed U8G2 display initialization.
i2c_port_num_t i2c_port
+ Here is the caller graph for this function:

◆ i2c_u8g2_deinit()

esp_err_t i2c_u8g2_deinit ( i2c_u8g2_handle_t *  handle)

Deinitialize display device and I2C bus.

Definition at line 367 of file priv_i2c_u8g2.c.

368{
369 ESP_RETURN_ON_FALSE(handle != NULL, ESP_ERR_INVALID_ARG, TAG, "handle is NULL");
370
371 if (handle->display_dev_handle != NULL) {
372 ESP_RETURN_ON_ERROR(i2c_master_bus_rm_device(handle->display_dev_handle),
373 TAG, "Failed to remove display device");
374 handle->display_dev_handle = NULL;
376 }
377
378 if (handle->i2c_bus_handle != NULL) {
379 ESP_RETURN_ON_ERROR(i2c_del_master_bus(handle->i2c_bus_handle),
380 TAG, "Failed to delete I2C master bus");
381 handle->i2c_bus_handle = NULL;
382 s_i2c_bus_handle = NULL;
383 }
384
385 if (s_active_handle == handle) {
386 s_active_handle = NULL;
387 }
388
389 s_display_available = false;
390 handle->initialized = false;
391 return ESP_OK;
392}
static i2c_u8g2_handle_t * s_active_handle
i2c_master_bus_handle_t i2c_bus_handle

◆ i2c_u8g2_get_u8g2()

u8g2_t * i2c_u8g2_get_u8g2 ( i2c_u8g2_handle_t *  handle)

Get the U8G2 object for draw operations.

Definition at line 394 of file priv_i2c_u8g2.c.

395{
396 if (handle == NULL || !handle->initialized) {
397 return NULL;
398 }
399 return &handle->u8g2;
400}
+ Here is the caller graph for this function:

◆ i2c_u8g2_gpio_and_delay_cb()

static uint8_t i2c_u8g2_gpio_and_delay_cb ( u8x8_t *  u8x8,
uint8_t  msg,
uint8_t  arg_int,
void *  arg_ptr 
)
static

Definition at line 201 of file priv_i2c_u8g2.c.

203{
204 (void)u8x8;
205 (void)arg_ptr;
206
207 switch (msg) {
208 case U8X8_MSG_GPIO_AND_DELAY_INIT:
209 ESP_LOGI(TAG, "GPIO and delay initialization completed");
210 break;
211
212 case U8X8_MSG_DELAY_MILLI:
213 vTaskDelay(pdMS_TO_TICKS(arg_int));
214 break;
215
216 case U8X8_MSG_DELAY_10MICRO:
217 esp_rom_delay_us(arg_int * 10);
218 break;
219
220 case U8X8_MSG_DELAY_100NANO:
221 __asm__ __volatile__("nop");
222 break;
223
224 case U8X8_MSG_DELAY_I2C:
225 if (arg_int == 0) {
226 return 1;
227 }
228 esp_rom_delay_us(5 / arg_int);
229 break;
230
231 case U8X8_MSG_GPIO_RESET:
232 break;
233
234 default:
235 return 0;
236 }
237
238 return 1;
239}
+ Here is the caller graph for this function:

◆ i2c_u8g2_handle_from_u8x8()

static i2c_u8g2_handle_t * i2c_u8g2_handle_from_u8x8 ( u8x8_t *  u8x8)
inlinestatic

Definition at line 121 of file priv_i2c_u8g2.c.

122{
123 (void)u8x8;
124 return s_active_handle;
125}
+ Here is the caller graph for this function:

◆ i2c_u8g2_init()

esp_err_t i2c_u8g2_init ( i2c_u8g2_handle_t *  handle,
const i2c_u8g2_config_t *  config 
)

Initialize I2C bus and U8G2 display.

If config->setup_fn is NULL, defaults to SSD1306 128x64 noname full buffer setup.

Definition at line 257 of file priv_i2c_u8g2.c.

258{
259 esp_err_t probe_ret;
260 uint8_t resolved_address;
261 uint16_t probe_timeout_ms;
262
263 ESP_RETURN_ON_FALSE(handle != NULL, ESP_ERR_INVALID_ARG, TAG, "handle is NULL");
264 ESP_RETURN_ON_FALSE(config != NULL, ESP_ERR_INVALID_ARG, TAG, "config is NULL");
265 ESP_RETURN_ON_FALSE(config->timeout_ms > 0, ESP_ERR_INVALID_ARG, TAG, "timeout_ms must be > 0");
266 ESP_RETURN_ON_FALSE(config->scl_speed_hz > 0, ESP_ERR_INVALID_ARG, TAG, "scl_speed_hz must be > 0");
267 ESP_RETURN_ON_FALSE(config->device_address <= 0x7F, ESP_ERR_INVALID_ARG, TAG,
268 "device_address must be 7-bit");
269
270 memset(handle, 0, sizeof(*handle));
271 handle->timeout_ms = config->timeout_ms;
272 handle->scl_speed_hz = config->scl_speed_hz;
273 handle->device_address = config->device_address;
274
275 s_timeout_ms = config->timeout_ms;
278 s_display_available = false;
279
280 probe_timeout_ms = (config->timeout_ms < I2C_PROBE_TIMEOUT_MS_MAX)
281 ? config->timeout_ms
283
284 i2c_master_bus_config_t bus_config = {
285 .i2c_port = config->i2c_port,
286 .sda_io_num = config->sda_io_num,
287 .scl_io_num = config->scl_io_num,
288 .clk_source = I2C_CLK_SRC_DEFAULT,
289 .glitch_ignore_cnt = 7,
290 .intr_priority = 0,
291 .trans_queue_depth = 0,
292 .flags.enable_internal_pullup = config->enable_internal_pullup,
293 };
294
295 ESP_RETURN_ON_ERROR(i2c_new_master_bus(&bus_config, &s_i2c_bus_handle),
296 TAG, "Failed to create I2C master bus");
297
299 probe_timeout_ms,
300 &resolved_address);
301 if (probe_ret != ESP_OK) {
302 if (probe_ret == ESP_ERR_NOT_FOUND) {
303 uint8_t found_addresses[12];
304 size_t total_found = i2c_u8g2_scan_bus(found_addresses,
305 sizeof(found_addresses),
306 probe_timeout_ms);
307
308 i2c_u8g2_log_scan_results(found_addresses,
309 (total_found < sizeof(found_addresses)) ? total_found : sizeof(found_addresses),
310 total_found);
311 } else if (probe_ret == ESP_ERR_TIMEOUT) {
312 ESP_LOGW(TAG,
313 "I2C probe timed out; skipping full bus scan to avoid timeout spam");
314 } else {
315 ESP_LOGW(TAG,
316 "I2C probe failed before scan (%s)",
317 esp_err_to_name(probe_ret));
318 }
319
320 ESP_LOGW(TAG,
321 "No I2C display detected at 0x%02X (SDA=%d, SCL=%d, %uHz)",
322 config->device_address,
323 (int)config->sda_io_num,
324 (int)config->scl_io_num,
325 (unsigned int)config->scl_speed_hz);
326 i2c_del_master_bus(s_i2c_bus_handle);
327 s_i2c_bus_handle = NULL;
328 return (probe_ret == ESP_ERR_NOT_FOUND) ? ESP_ERR_NOT_FOUND : probe_ret;
329 }
330
331 handle->device_address = resolved_address;
332 s_device_address = resolved_address;
333
334 s_display_available = true;
335
336 /* Brief delay to allow display to stabilize after bus init */
337 vTaskDelay(pdMS_TO_TICKS(10));
338
340
341 i2c_u8g2_setup_fn_t setup_fn = config->setup_fn;
342 if (setup_fn == NULL) {
343 setup_fn = u8g2_Setup_ssd1315_i2c_128x64_noname_f;
344 }
345
346 setup_fn(&handle->u8g2,
347 config->rotation != NULL ? config->rotation : U8G2_R0,
350
351 s_active_handle = handle;
352
353 u8g2_InitDisplay(&handle->u8g2);
354 u8g2_SetPowerSave(&handle->u8g2, 0);
355
356 /* Test draw to verify I2C communication works */
357 u8g2_ClearBuffer(&handle->u8g2);
358 u8g2_SetFont(&handle->u8g2, u8g2_font_6x10_tf);
359 u8g2_DrawStr(&handle->u8g2, 0, 12, "Init OK");
360 u8g2_SendBuffer(&handle->u8g2);
361 ESP_LOGI(TAG, "Test draw completed");
362
363 handle->initialized = true;
364 return ESP_OK;
365}
static uint8_t i2c_u8g2_byte_cb(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
static void i2c_u8g2_log_scan_results(const uint8_t *found_addresses, size_t stored_count, size_t total_count)
static esp_err_t i2c_u8g2_resolve_display_address(uint8_t preferred_address, uint16_t probe_timeout_ms, uint8_t *resolved_address)
#define I2C_PROBE_TIMEOUT_MS_MAX
static size_t i2c_u8g2_scan_bus(uint8_t *found_addresses, size_t max_found, uint16_t probe_timeout_ms)
static uint8_t i2c_u8g2_gpio_and_delay_cb(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
void(* i2c_u8g2_setup_fn_t)(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb)
U8G2 setup callback signature.
gpio_num_t sda_io_num
gpio_num_t scl_io_num
const u8g2_cb_t * rotation
i2c_u8g2_setup_fn_t setup_fn
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ i2c_u8g2_log_scan_results()

static void i2c_u8g2_log_scan_results ( const uint8_t *  found_addresses,
size_t  stored_count,
size_t  total_count 
)
static

Definition at line 52 of file priv_i2c_u8g2.c.

55{
56 char buffer[96] = {0};
57 size_t offset = 0;
58
59 if (total_count == 0) {
60 ESP_LOGW(TAG, "I2C scan found no responding devices");
61 return;
62 }
63
64 for (size_t i = 0; i < stored_count; ++i) {
65 int wrote = snprintf(buffer + offset, sizeof(buffer) - offset,
66 (i == 0) ? "0x%02X" : ", 0x%02X",
67 found_addresses[i]);
68 if (wrote <= 0 || (size_t)wrote >= (sizeof(buffer) - offset)) {
69 break;
70 }
71 offset += (size_t)wrote;
72 }
73
74 if (total_count > stored_count && offset + 4 < sizeof(buffer)) {
75 snprintf(buffer + offset, sizeof(buffer) - offset, ", ...");
76 }
77
78 ESP_LOGW(TAG, "I2C scan detected %u device(s): %s",
79 (unsigned int)total_count,
80 buffer[0] != '\0' ? buffer : "(list truncated)");
81}
+ Here is the caller graph for this function:

◆ i2c_u8g2_resolve_display_address()

static esp_err_t i2c_u8g2_resolve_display_address ( uint8_t  preferred_address,
uint16_t  probe_timeout_ms,
uint8_t *  resolved_address 
)
static

Definition at line 83 of file priv_i2c_u8g2.c.

86{
87 uint8_t alternate_address;
88 esp_err_t probe_ret;
89
90 probe_ret = i2c_master_probe(s_i2c_bus_handle, preferred_address, probe_timeout_ms);
91 if (probe_ret == ESP_OK) {
92 *resolved_address = preferred_address;
93 return ESP_OK;
94 }
95
96 if (probe_ret == ESP_ERR_TIMEOUT) {
97 return probe_ret;
98 }
99
100 if (preferred_address == 0x3C) {
101 alternate_address = 0x3D;
102 } else if (preferred_address == 0x3D) {
103 alternate_address = 0x3C;
104 } else {
105 return ESP_ERR_NOT_FOUND;
106 }
107
108 probe_ret = i2c_master_probe(s_i2c_bus_handle, alternate_address, probe_timeout_ms);
109 if (probe_ret == ESP_OK) {
110 ESP_LOGW(TAG,
111 "Configured display address 0x%02X not found, using 0x%02X",
112 preferred_address,
113 alternate_address);
114 *resolved_address = alternate_address;
115 return ESP_OK;
116 }
117
118 return probe_ret;
119}
+ Here is the caller graph for this function:

◆ i2c_u8g2_scan_bus()

static size_t i2c_u8g2_scan_bus ( uint8_t *  found_addresses,
size_t  max_found,
uint16_t  probe_timeout_ms 
)
static

Definition at line 34 of file priv_i2c_u8g2.c.

37{
38 size_t found_count = 0;
39
40 for (uint16_t address = 0x08; address <= 0x77; ++address) {
41 if (i2c_master_probe(s_i2c_bus_handle, address, probe_timeout_ms) == ESP_OK) {
42 if (found_count < max_found) {
43 found_addresses[found_count] = (uint8_t)address;
44 }
45 found_count++;
46 }
47 }
48
49 return found_count;
50}
+ Here is the caller graph for this function:

◆ i2c_u8g2_set_power_save()

esp_err_t i2c_u8g2_set_power_save ( i2c_u8g2_handle_t *  handle,
bool  enable 
)

Set display power save mode.

Definition at line 402 of file priv_i2c_u8g2.c.

403{
404 ESP_RETURN_ON_FALSE(handle != NULL, ESP_ERR_INVALID_ARG, TAG, "handle is NULL");
405 ESP_RETURN_ON_FALSE(handle->initialized, ESP_ERR_INVALID_STATE, TAG, "display not initialized");
406
407 u8g2_SetPowerSave(&handle->u8g2, enable ? 1 : 0);
408 return ESP_OK;
409}

Variable Documentation

◆ s_active_handle

i2c_u8g2_handle_t* s_active_handle = NULL
static

Definition at line 26 of file priv_i2c_u8g2.c.

◆ s_device_address

uint8_t s_device_address = 0x3C
static

Definition at line 31 of file priv_i2c_u8g2.c.

◆ s_display_available

bool s_display_available = false
static

Definition at line 32 of file priv_i2c_u8g2.c.

◆ s_display_dev_handle

i2c_master_dev_handle_t s_display_dev_handle = NULL
static

Definition at line 28 of file priv_i2c_u8g2.c.

◆ s_i2c_bus_handle

i2c_master_bus_handle_t s_i2c_bus_handle = NULL
static

Definition at line 27 of file priv_i2c_u8g2.c.

◆ s_scl_speed_hz

uint32_t s_scl_speed_hz = 0
static

Definition at line 29 of file priv_i2c_u8g2.c.

◆ s_timeout_ms

uint16_t s_timeout_ms = 1000
static

Definition at line 30 of file priv_i2c_u8g2.c.

◆ TAG

const char* TAG = "i2c_u8g2"
static

Definition at line 10 of file priv_i2c_u8g2.c.