add firmware

This commit is contained in:
digimint 2026-01-22 19:54:53 -06:00
parent f165ccdc95
commit 580bc8716c
Signed by: digimint
GPG key ID: 8DF1C6FD85ABF748
21 changed files with 6148 additions and 0 deletions

View file

@ -0,0 +1,34 @@
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <freertos/event_groups.h>
#define INPUTS_TAG ("INPUT")
extern TaskHandle_t T_ReadInputs_Handle;
extern EventGroupHandle_t EV_InputEventGroupHandle;
typedef enum InputEventGroupFlags {
INPUT_EVENT_WHEEL = (1 << 0),
INPUT_EVENT_KEY_FORWARD = (1 << 1),
INPUT_EVENT_KEY_BACKSPACE = (1 << 2),
INPUT_EVENT_KEY_DONE = (1 << 3),
INPUT_EVENT_KEY_CANCEL = (1 << 4),
INPUT_EVENT_KEY_OPTION = (1 << 5)
} UIEventGroupFlags_t;
typedef struct InputState {
bool forward, backspace, done, cancel, option;
int wheel;
uint8_t _wheelQuadrant;
} InputState_t;
void init_inputs();
InputState_t waitForInputEvents(UIEventGroupFlags_t events, BaseType_t xWaitForAll, TickType_t xTicksToWait);
InputState_t getInputState();