Optimized main control loop
This commit is contained in:
@@ -3,21 +3,6 @@
|
||||
|
||||
#include "stm32f4xx_hal.h"
|
||||
|
||||
typedef enum {
|
||||
CONTROL_STOP = 0,
|
||||
CONTROL_RESET_BEGIN,
|
||||
CONTROL_RESET_1,
|
||||
CONTROL_RESET_2,
|
||||
CONTROL_RESET_3,
|
||||
CONTROL_RESET_4,
|
||||
CONTROL_RESET_5,
|
||||
CONTROL_RESET_6,
|
||||
CONTROL_RESET_7,
|
||||
CONTROL_RESET_END = 9,
|
||||
CONTROL_CLOCK_LOW,
|
||||
CONTROL_CLOCK_HIGH
|
||||
} ControlState;
|
||||
|
||||
typedef struct {
|
||||
uint8_t dirty;
|
||||
uint8_t action;
|
||||
@@ -31,7 +16,6 @@ typedef struct {
|
||||
} Storage;
|
||||
|
||||
typedef struct {
|
||||
ControlState state;
|
||||
uint8_t memory_config;
|
||||
Storage storage;
|
||||
} Control;
|
||||
@@ -41,7 +25,7 @@ void write_data(uint8_t value);
|
||||
uint8_t read_data();
|
||||
|
||||
void control_program_eeprom(uint8_t* data, uint16_t length);
|
||||
void control_execute_state();
|
||||
void control_cycle();
|
||||
void control_reset();
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user