IoT25S IoT Klocka 0.1
Grupparbete för IoT25S på Jensen YH
Loading...
Searching...
No Matches
display_ui.h File Reference

OLED display UI service API. More...

#include "esp_err.h"
+ Include dependency graph for display_ui.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

esp_err_t display_ui_start (void)
 Initialize display backend and start the UI task.
 

Detailed Description

OLED display UI service API.

Definition in file display_ui.h.

Function Documentation

◆ display_ui_start()

esp_err_t display_ui_start ( void  )

Initialize display backend and start the UI task.

Returns
ESP_OK on success, otherwise an ESP_ERR_* code.

Definition at line 154 of file display_ui.c.

155{
157 esp_err_t ret = i2c_u8g2_init(&s_display_handle, &config);
158 if (ret != ESP_OK) {
159 ESP_LOGE(TAG, "Display init failed (%s)", esp_err_to_name(ret));
160 return ret;
161 }
162
164 if (s_u8g2 == NULL) {
165 return ESP_FAIL;
166 }
167
168 BaseType_t task_ok = xTaskCreate(display_ui_task, "display_ui", 4096, NULL, 4, NULL);
169 return (task_ok == pdPASS) ? ESP_OK : ESP_FAIL;
170}
static void display_ui_task(void *arg)
Definition display_ui.c:135
static u8g2_t * s_u8g2
Definition display_ui.c:25
static const char * TAG
Definition display_ui.c:18
static i2c_u8g2_handle_t s_display_handle
Definition display_ui.c:24
i2c_u8g2_config_t i2c_u8g2_config_default(void)
Fill a config with menuconfig-backed defaults.
u8g2_t * i2c_u8g2_get_u8g2(i2c_u8g2_handle_t *handle)
Get the U8G2 object for draw operations.
esp_err_t i2c_u8g2_init(i2c_u8g2_handle_t *handle, const i2c_u8g2_config_t *config)
Initialize I2C bus and U8G2 display.
Configuration for I2C-backed U8G2 display initialization.
+ Here is the call graph for this function:
+ Here is the caller graph for this function: