Compare commits
6
Commits
5ea3df10a4
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ce58f411e | ||
|
|
67a85f2c11 | ||
|
|
98b5b96171 | ||
|
|
76f1c90afe | ||
|
|
8fed43c086 | ||
|
|
4c52bff3e7 |
@@ -1,3 +1,6 @@
|
|||||||
[submodule "components/blk_box_lib"]
|
[submodule "components/blk_box_lib"]
|
||||||
path = components/blk_box_lib
|
path = components/blk_box_lib
|
||||||
url = https://git.marinodev.com/MarinoDev/blk_box_lib.git
|
url = https://git.marinodev.com/MarinoDev/blk_box_lib.git
|
||||||
|
[submodule "components/blk_box_common"]
|
||||||
|
path = components/blk_box_common
|
||||||
|
url = https://git.marinodev.com/MarinoDev/blk_box_common.git
|
||||||
|
|||||||
Submodule
+1
Submodule components/blk_box_common added at de3572385b
+1
-1
Submodule components/blk_box_lib updated: 0b79eb8399...562b6cea8b
+21
-2
@@ -1,4 +1,14 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
|
atanisoft/esp_lcd_ili9488:
|
||||||
|
component_hash: 1bbdbec8ae5b5c32db45ace2c19a8d79c0eaa919209ce190a0be3dada703ddcf
|
||||||
|
dependencies:
|
||||||
|
- name: idf
|
||||||
|
require: private
|
||||||
|
version: '>=4.4.2'
|
||||||
|
source:
|
||||||
|
registry_url: https://components.espressif.com/
|
||||||
|
type: service
|
||||||
|
version: 1.1.1
|
||||||
espressif/led_strip:
|
espressif/led_strip:
|
||||||
component_hash: 28621486f77229aaf81c71f5e15d6fbf36c2949cf11094e07090593e659e7639
|
component_hash: 28621486f77229aaf81c71f5e15d6fbf36c2949cf11094e07090593e659e7639
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -12,10 +22,19 @@ dependencies:
|
|||||||
idf:
|
idf:
|
||||||
source:
|
source:
|
||||||
type: idf
|
type: idf
|
||||||
version: 6.0.0
|
version: 6.0.2
|
||||||
|
lvgl/lvgl:
|
||||||
|
component_hash: d7c1ac037ae6e85d94897f807d6e7ba0946a83e720074fc95a4f6241da9f9f53
|
||||||
|
dependencies: []
|
||||||
|
source:
|
||||||
|
registry_url: https://components.espressif.com/
|
||||||
|
type: service
|
||||||
|
version: 8.4.0
|
||||||
direct_dependencies:
|
direct_dependencies:
|
||||||
|
- atanisoft/esp_lcd_ili9488
|
||||||
- espressif/led_strip
|
- espressif/led_strip
|
||||||
- idf
|
- idf
|
||||||
manifest_hash: d8fb11fe9d2246f588be185955562c86050e5dc4c222815277426614f2136bfe
|
- lvgl/lvgl
|
||||||
|
manifest_hash: 7282d42cdeb16392146e8acc67acc4625ae6ba6cba2b36852bd0e96432388883
|
||||||
target: esp32s3
|
target: esp32s3
|
||||||
version: 3.0.0
|
version: 3.0.0
|
||||||
|
|||||||
+12
-1
@@ -5,4 +5,15 @@ idf_component_register(
|
|||||||
esp_driver_i2c
|
esp_driver_i2c
|
||||||
spi_flash
|
spi_flash
|
||||||
blk_box_lib
|
blk_box_lib
|
||||||
INCLUDE_DIRS "")
|
blk_box_common
|
||||||
|
|
||||||
|
esp_event
|
||||||
|
esp_netif
|
||||||
|
esp_wifi
|
||||||
|
nvs_flash
|
||||||
|
INCLUDE_DIRS ""
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_options(${COMPONENT_LIB} PRIVATE
|
||||||
|
-Wno-error=missing-field-initializers
|
||||||
|
)
|
||||||
|
|||||||
+8
-42
@@ -1,53 +1,19 @@
|
|||||||
#include <stdio.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include "sdkconfig.h"
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
#include "esp_chip_info.h"
|
|
||||||
#include "esp_flash.h"
|
|
||||||
#include "esp_system.h"
|
|
||||||
#include "blk_box.h"
|
#include "blk_box.h"
|
||||||
#include "blk_box_drivers/i2c.h"
|
#include "blk_box_drivers/char_lcd.hpp"
|
||||||
#include "blk_box_drivers/inputs.hpp"
|
#include "blk_box_drivers/helpers.hpp"
|
||||||
#include "blk_box_drivers/leds.hpp"
|
#include <lvgl.h>
|
||||||
|
|
||||||
|
const static char TAG[] = "main";
|
||||||
|
|
||||||
extern "C" void app_main(void) {
|
extern "C" void app_main(void) {
|
||||||
BlkBoxInitConfig blk_box_cfg = {};
|
BlkBoxInitConfig blk_box_cfg = {};
|
||||||
init_blk_box(blk_box_cfg);
|
init_blk_box(blk_box_cfg);
|
||||||
|
|
||||||
printf("Hello, Blk Box!\n");
|
LCDController::set_backlight(true);
|
||||||
|
|
||||||
uint32_t i = 0;
|
lcd_do_splash();
|
||||||
|
|
||||||
while (1) {
|
|
||||||
if (InputsController::has_button_press()) {
|
|
||||||
Button b = InputsController::wait_button_press();
|
|
||||||
printf("Button pressed: %d\n", raw_value(b));
|
|
||||||
if (b == Button::GREEN) {
|
|
||||||
LEDController::set_indicator(static_cast<IndicatorLED>(i + LED_SHAPE_COUNT), LEDColor::GREEN);
|
|
||||||
LEDController::flush();
|
|
||||||
} else if (b == Button::YELLOW) {
|
|
||||||
LEDController::set_indicator(static_cast<IndicatorLED>(i + LED_SHAPE_COUNT), LEDColor::YELLOW);
|
|
||||||
LEDController::flush();
|
|
||||||
} else if (b == Button::RED) {
|
|
||||||
i = (i + 1) % LED_INDICATOR_COUNT;
|
|
||||||
} else if (b == Button::BLUE) {
|
|
||||||
i = (i + LED_INDICATOR_COUNT - 1) % LED_INDICATOR_COUNT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (InputsController::has_switch_flip()) {
|
|
||||||
SwitchFlip flip = InputsController::wait_switch_flip();
|
|
||||||
printf("Switch flipped: %d, new state: %d\n", raw_value(flip.get_switch()), flip.is_up());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (InputsController::has_keypad_press()) {
|
|
||||||
KeypadKey k = InputsController::wait_keypad_press();
|
|
||||||
printf("Keypad key pressed: %c\n", keypad_key_to_char(k));
|
|
||||||
LEDController::flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
vTaskDelay(10 / portTICK_PERIOD_MS);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// TODO: impl P001DM
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# ESP-IDF Partition Table
|
||||||
|
# Name, Type, SubType, Offset, Size, Flags
|
||||||
|
nvs,data,nvs,,0x4000,
|
||||||
|
otadata,data,ota,,0x2000,
|
||||||
|
phy_init,data,phy,,0x1000,
|
||||||
|
factory,app,factory,,0x11000,
|
||||||
|
ota_0,app,ota_0,,3M,
|
||||||
|
ota_1,app,ota_1,,3M,
|
||||||
|
@@ -0,0 +1,9 @@
|
|||||||
|
# This file was generated using idf.py save-defconfig or menuconfig [D] key. It can be edited manually.
|
||||||
|
# Espressif IoT Development Framework (ESP-IDF) 6.0.2 Project Minimal Configuration
|
||||||
|
#
|
||||||
|
# default:
|
||||||
|
CONFIG_IDF_TARGET="esp32s3"
|
||||||
|
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
|
||||||
|
CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE=y
|
||||||
|
CONFIG_PARTITION_TABLE_CUSTOM=y
|
||||||
|
CONFIG_LV_FONT_MONTSERRAT_24=y
|
||||||
Reference in New Issue
Block a user