diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..e6bb0725 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,8 @@ +# Note + +During the pre-alpha stage, contributions will not yet be considered. + +# Code Style + +See [github.com/MaJerle/c-code-style](https://github.com/MaJerle/c-code-style). + diff --git a/components/board_2432s024/board_2432s024_display.c b/components/board_2432s024/board_2432s024_display.c index c2b5fca1..a4653457 100644 --- a/components/board_2432s024/board_2432s024_display.c +++ b/components/board_2432s024/board_2432s024_display.c @@ -26,13 +26,13 @@ static SemaphoreHandle_t refresh_finish = NULL; #define BITS_PER_PIXEL 16 #define DRAW_BUFFER_HEIGHT 80 -IRAM_ATTR static bool test_notify_refresh_ready(esp_lcd_panel_io_handle_t io_handle, esp_lcd_panel_io_event_data_t* edata, void* user_ctx) { +IRAM_ATTR static bool prv_on_color_trans_done(esp_lcd_panel_io_handle_t io_handle, esp_lcd_panel_io_event_data_t* edata, void* user_ctx) { BaseType_t need_yield = pdFALSE; xSemaphoreGiveFromISR(refresh_finish, &need_yield); return (need_yield == pdTRUE); } -static esp_err_t ili9341_create_display(nb_display_t* display) { +static esp_err_t prv_create_display(nb_display_t* display) { ESP_LOGI(TAG, "init started"); gpio_config_t io_conf = { @@ -59,7 +59,7 @@ static esp_err_t ili9341_create_display(nb_display_t* display) { const esp_lcd_panel_io_spi_config_t panel_io_config = ILI9341_PANEL_IO_SPI_CONFIG( PIN_CS, PIN_DC, - test_notify_refresh_ready, + prv_on_color_trans_done, NULL ); @@ -117,7 +117,7 @@ static esp_err_t ili9341_create_display(nb_display_t* display) { nb_display_driver_t board_2432s024_create_display_driver() { nb_display_driver_t driver = { .name = "ili9341_2432s024", - .create_display = &ili9341_create_display + .create_display = &prv_create_display }; return driver; } diff --git a/components/board_2432s024/board_2432s024_touch.c b/components/board_2432s024/board_2432s024_touch.c index 36092522..59c23f3a 100644 --- a/components/board_2432s024/board_2432s024_touch.c +++ b/components/board_2432s024/board_2432s024_touch.c @@ -9,7 +9,7 @@ const char* TAG = "cst816"; -static esp_err_t cst816_init_io(esp_lcd_panel_io_handle_t* io_handle) { +static esp_err_t prv_init_io(esp_lcd_panel_io_handle_t* io_handle) { // Init I2C const i2c_config_t i2c_conf = { .mode = I2C_MODE_MASTER, @@ -29,7 +29,7 @@ static esp_err_t cst816_init_io(esp_lcd_panel_io_handle_t* io_handle) { return ESP_OK; } -static esp_err_t cst816_create_touch(esp_lcd_panel_io_handle_t io_handle, esp_lcd_touch_handle_t* touch_handle) { +static esp_err_t prv_create_touch(esp_lcd_panel_io_handle_t io_handle, esp_lcd_touch_handle_t* touch_handle) { // Configure touch esp_lcd_touch_config_t config = { .x_max = 240, @@ -55,8 +55,8 @@ static esp_err_t cst816_create_touch(esp_lcd_panel_io_handle_t io_handle, esp_lc nb_touch_driver_t board_2432s024_create_touch_driver() { nb_touch_driver_t driver = { .name = "cst816s_2432s024", - .init_io = cst816_init_io, - .create_touch = &cst816_create_touch + .init_io = prv_init_io, + .create_touch = &prv_create_touch }; return driver; } diff --git a/components/nanobake/src/nb_platform.c b/components/nanobake/src/nb_platform.c index f71d1144..122d7450 100644 --- a/components/nanobake/src/nb_platform.c +++ b/components/nanobake/src/nb_platform.c @@ -8,7 +8,7 @@ static const char* TAG = "nb_platform"; -static esp_err_t prv_nb_lvgl_init( +static esp_err_t prv_lvgl_init( nb_platform_t* platform ) { const lvgl_port_cfg_t lvgl_cfg = { @@ -71,7 +71,7 @@ esp_err_t nb_platform_create(nb_platform_config_t config, nb_platform_t* platfor ); ESP_RETURN_ON_ERROR( - prv_nb_lvgl_init(platform), + prv_lvgl_init(platform), nbi_tag, "lvgl init failed" ); diff --git a/main/main.c b/main/main.c index 0943d426..267e4a2c 100644 --- a/main/main.c +++ b/main/main.c @@ -1,8 +1,8 @@ #include #include -#include #include + // Nanobake board support with drivers: #include #include