implement left/right with callback
Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
if (DEFINED ENV{IDF_PATH})
|
||||
idf_component_register(SRCS
|
||||
PushButton.cpp
|
||||
persistence.c
|
||||
INCLUDE_DIRS "include"
|
||||
)
|
||||
return()
|
||||
@@ -10,7 +10,7 @@ cmake_minimum_required(VERSION 3.30)
|
||||
project(ruth)
|
||||
|
||||
add_library(${PROJECT_NAME} STATIC
|
||||
PushButton.cpp
|
||||
persistence.c
|
||||
)
|
||||
|
||||
include_directories(include)
|
||||
|
@@ -1 +0,0 @@
|
||||
#include "include/PushButton.h"
|
@@ -1,9 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#define BUTTON_UP 0
|
||||
#define BUTTON_DOWN 1
|
||||
#define BUTTON_LEFT 2
|
||||
#define BUTTON_RIGHT 3
|
||||
|
||||
#define BUTTON_SELECT 4
|
||||
#define BUTTON_BACK 5
|
8
components/ruth/include/persistence.h
Normal file
8
components/ruth/include/persistence.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *name;
|
||||
|
||||
void (*save)(const char *key, const char *value);
|
||||
} persistence_t;
|
3
components/ruth/persistence.c
Normal file
3
components/ruth/persistence.c
Normal file
@@ -0,0 +1,3 @@
|
||||
//
|
||||
// Created by Siegmund, Peter on 14.06.25.
|
||||
//
|
Reference in New Issue
Block a user