Working UART

This commit is contained in:
2024-09-16 19:43:48 +03:00
parent cad6b45c5d
commit 2ef50d8b07
6 changed files with 142 additions and 90 deletions

View File

@ -17,6 +17,39 @@ typedef enum ServoMap{
SERVO_VERTICAL = 2
}ServoMap;
typedef enum CurrentMode {
NoneMode, ShotMode, ProgramMode, MacroMode,
} Mode;
typedef struct CurrentShot {
uint8_t index;
Shot shot;
} CurrentShot;
typedef struct CurrentProgram {
uint8_t index;
Program program;
uint8_t shot_index;
} CurrentProgram;
typedef struct CurrentMacro {
uint8_t index;
Macro macro;
uint8_t program_index;
} CurrentMacro;
typedef struct CurrentState {
uint8_t isPause;
uint8_t isShooting;
} CurrentState;
typedef struct CurrentInfo {
Mode mode;
CurrentState state;
CurrentShot shot;
CurrentProgram program;
CurrentMacro macro;
} CurrentInfo;
void doShot(Shot*);