Separate the configuration to hardware configuration and user configuration. Implement async I2C EEPROM handling. Remove USB functions that dealt with EEPROM and individual LEDs because they were dependent on sync I2C functions.
This commit is contained in:
30
right/src/eeprom.h
Normal file
30
right/src/eeprom.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef __EEPROM_H__
|
||||
#define __EEPROM_H__
|
||||
|
||||
// Macros:
|
||||
|
||||
#define EEPROM_ADDRESS_LENGTH 2
|
||||
#define EEPROM_PAGE_SIZE 64
|
||||
#define EEPROM_BUFFER_SIZE (EEPROM_ADDRESS_LENGTH + EEPROM_PAGE_SIZE)
|
||||
|
||||
// Typedefs:
|
||||
|
||||
typedef enum {
|
||||
EepromTransfer_ReadHardwareConfiguration,
|
||||
EepromTransfer_WriteHardwareConfiguration,
|
||||
EepromTransfer_ReadUserConfiguration,
|
||||
EepromTransfer_WriteUserConfiguration,
|
||||
} eeprom_transfer_t;
|
||||
|
||||
// Variables:
|
||||
|
||||
extern bool IsEepromBusy;
|
||||
extern eeprom_transfer_t CurrentEepromTransfer;
|
||||
extern status_t EepromTransferStatus;
|
||||
|
||||
// Functions:
|
||||
|
||||
extern void EEPROM_Init(void);
|
||||
extern status_t EEPROM_LaunchTransfer(eeprom_transfer_t transferType);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user