Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
cmake_minimum_required(VERSION 3.16)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)

idf_build_set_property(MINIMAL_BUILD ON)

project(Lumen)

set(${IDF_TARGET} esp32c3)
Binary file added assets/icon_minecraft_sync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified components/vision-ui/libvision_ui.a
Binary file not shown.
16 changes: 12 additions & 4 deletions components/vision-ui/vision_ui_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,21 @@ typedef struct vision_ui_list_icon { // NOLINT

size_t footer_width; // NOLINT
size_t footer_height; // NOLINT
} vision_ui_icon_t; // NOLINT
} vision_ui_icon_t;

typedef struct vision_ui_font { // NOLINT
const void* font; // NOLINT
int8_t top_compensation; // NOLINT
int8_t bottom_compensation; // NOLINT
} vision_ui_font_t; // NOLINT
} vision_ui_font_t;

typedef enum vision_ui_action_t { // NOLINT
UiActionNone,
UiActionGoPrev,
UiActionGoNext,
UiActionEnter,
UiActionExit,
} vision_ui_action_t; // NOLINT
} vision_ui_action_t;
#else
#include "vision_ui_item.h"
#include "vision_ui_renderer.h"
Expand All @@ -139,9 +139,9 @@ typedef struct LumenSystemConfig {
const uint8_t* usbIcon;
const uint8_t* statIcon;
const uint8_t* creeperIcon;
const uint8_t* minecraftSyncIcon;
} LumenSystemConfig;


LumenSystemInfo lumenGetSystemInfo();
LumenSystemConfig lumenGetSystemConfig();

Expand Down Expand Up @@ -183,6 +183,14 @@ typedef struct LumenEasterEggState {
LumenEasterEgg lumenGetEasterEgg();
LumenEasterEggState lumenGetEasterEggState();

typedef struct LumenMinecraftSync {
void (*initFunction)();
void (*loopFunction)();
void (*exitFunction)();
} LumenMinecraftSync;

LumenMinecraftSync lumenGetMinecraftSync();

extern void vision_ui_step_render(); // NOLINT
extern void vision_ui_allocator_set(void* (*allocator)(vision_alloc_op_t op, size_t size, size_t count, void* ptr)
); // NOLINT
Expand Down
33 changes: 22 additions & 11 deletions dependencies.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
espp/base_component:
component_hash: a4da2e51f8545f3f56c2cc4df62d58a5c1683aae6dca1303da6eeb382735d916
component_hash: 569d8a4c2520fbb8f9c79ddd772e278506c80099e218599c602a8891bb995bf9
dependencies:
- name: espp/logger
registry_url: https://components.espressif.com
Expand All @@ -12,9 +12,9 @@ dependencies:
source:
registry_url: https://components.espressif.com
type: service
version: 1.0.31
version: 1.0.33
espp/base_peripheral:
component_hash: a4c8029460ae556c256feb44d371bb6d9a47b9d0e7f862abf8ea2a312490b46e
component_hash: e9d1f27fa9346541b76aebb7dbf6150284cc600ac8019e208f600f6afac49990
dependencies:
- name: espp/base_component
registry_url: https://components.espressif.com
Expand All @@ -26,7 +26,7 @@ dependencies:
source:
registry_url: https://components.espressif.com
type: service
version: 1.0.31
version: 1.0.33
espp/filters:
component_hash: 5f680ee0759e546157ecf3140dcb22122cf27136acc745e3e404f4a9cdf01dbc
dependencies:
Expand All @@ -50,17 +50,17 @@ dependencies:
type: service
version: 1.0.31
espp/format:
component_hash: 97ebfaceff6189ab95190bee4da489c48e5295df8ddfcd401eabae88fead8bb8
component_hash: 9723eeb2cadb7191255337320f51edec7b300c648d98aa4ab92e93365297acc4
dependencies:
- name: idf
require: private
version: '>=5.0'
source:
registry_url: https://components.espressif.com
type: service
version: 1.0.31
version: 1.0.33
espp/logger:
component_hash: 4a0c402511864c995d9261642fb545c1af2a3fb6ff994007ce88f08155595b88
component_hash: 91bc16342ba44200df5b56977270921a863e3447d3c94049a75e30b8d515b34d
dependencies:
- name: espp/format
registry_url: https://components.espressif.com
Expand All @@ -72,7 +72,7 @@ dependencies:
source:
registry_url: https://components.espressif.com
type: service
version: 1.0.31
version: 1.0.33
espp/lsm6dso:
component_hash: 9fe231a62fa2d7181ae9d42f37f3929c7c42c6c8b010ba7164d97bff88fe357a
dependencies:
Expand All @@ -92,7 +92,7 @@ dependencies:
type: service
version: 1.0.31
espp/math:
component_hash: f44d40df31c2090ac56ce8e13073192563eeae259b6feb8f77084f39db1a9b29
component_hash: e17d2f738174843a4e0ccc6d45c161e56077643f063484f184f645e469a52faa
dependencies:
- name: espp/format
registry_url: https://components.espressif.com
Expand All @@ -104,7 +104,17 @@ dependencies:
source:
registry_url: https://components.espressif.com
type: service
version: 1.0.31
version: 1.0.33
espressif/cjson:
component_hash: 9372811fb197926f522c467627cf4a8e72b681e0366e17879631da801103aef3
dependencies:
- name: idf
require: private
version: '>=5.0'
source:
registry_url: https://components.espressif.com/
type: service
version: 1.7.19
espressif/esp-dsp:
component_hash: 42dce32d46ac93dc11f60d368e29a830e9661c7345d794b8a45c343479cae636
dependencies:
Expand All @@ -122,7 +132,8 @@ dependencies:
direct_dependencies:
- espp/filters
- espp/lsm6dso
- espressif/cjson
- idf
manifest_hash: 6cdf6f27fb1588c9d3cefad60614ba74add9b45ba0cbbc9dcfa9f50584405828
manifest_hash: aecbf1075f1692d244f2dae5ffccd5f7ba41d52f3346cb6ed99ec47b8e40c136
target: esp32c3
version: 2.0.0
1 change: 1 addition & 0 deletions main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ idf_component_register(
esp_driver_i2c
esp_driver_spi
esp_lcd
cjson
ina226
)

Expand Down
1 change: 1 addition & 0 deletions main/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ dependencies:
# public: true
espp/lsm6dso: ^1.0.31
espp/filters: ^1.0.31
espressif/cjson: ^1.7.19
11 changes: 11 additions & 0 deletions main/include/display.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#include <vision_ui_lib.h>

#define LCD_H_RES 240
#define LCD_V_RES 240

extern void displayFrameRender();

extern void displayInit(vision_ui_action_t (*callback)());

extern void displayDriverExtensionRGBBitmapDraw(
int16_t x,
int16_t y,
int16_t width,
int16_t height,
const uint16_t* colorData
);


#endif // MAIN_INCLUDE_DISPLAY_HPP
38 changes: 38 additions & 0 deletions main/include/serial_pack.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
Lumen
Copyright (C) 2025 Finn Sheng

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once

#ifndef MAIN_INCLUDE_SERIAL_PACK_HPP
#define MAIN_INCLUDE_SERIAL_PACK_HPP

#include <cstddef>
#include <cstdint>

using SerialPackHandler = void (*)(const uint8_t* data, size_t currentSize);

// Initialize USB Serial/TAG driver and internal handler table. Safe to call multiple times.
extern void serialPackInit();
// Start the FreeRTOS task that parses incoming serial packs.
extern void serialPackStart();
// Stop the parsing task (driver remains initialized).
extern void serialPackStop();

// Register or replace a handler for a given path. Call after init and before start.
extern void serialPackAttachHandler(const char* path, SerialPackHandler handler);

#endif // MAIN_INCLUDE_SERIAL_PACK_HPP
Loading