Rename ENABLE_PERIPHERAL_* macros to EnabledBootloaderPeripherial_* enums.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
__attribute__((used, section(".BootloaderConfig"))) const bootloader_config_t BootloaderConfig = {
|
||||
.tag = BOOTLOADER_TAG,
|
||||
.enabledPeripherals = ENABLE_PERIPHERAL_I2C,
|
||||
.enabledPeripherals = EnabledBootloaderPeripherial_I2c,
|
||||
.i2cSlaveAddress = I2C_ADDRESS_LEFT_KEYBOARD_HALF_BOOTLOADER,
|
||||
.peripheralDetectionTimeoutMs = BOOTLOADER_TIMEOUT_MS,
|
||||
.clockFlags = 0xFF, // Disable High speed mode
|
||||
|
||||
@@ -11,16 +11,17 @@
|
||||
#define BOOTLOADER_TAG 0x6766636B
|
||||
#define BOOTLOADER_TIMEOUT_MS 100
|
||||
|
||||
// bits for bootloader_config_t.enabledPeripherals
|
||||
#define ENABLE_PERIPHERAL_UART (1<<0)
|
||||
#define ENABLE_PERIPHERAL_I2C (1<<1)
|
||||
#define ENABLE_PERIPHERAL_SPI (1<<2)
|
||||
#define ENABLE_PERIPHERAL_CAN (1<<3)
|
||||
#define ENABLE_PERIPHERAL_USB_HID (1<<4)
|
||||
#define ENABLE_PERIPHERAL_USB_MSC (1<<7)
|
||||
|
||||
// Typedefs:
|
||||
|
||||
typedef enum {
|
||||
EnabledBootloaderPeripherial_Uart = (1<<0),
|
||||
EnabledBootloaderPeripherial_I2c = (1<<1),
|
||||
EnabledBootloaderPeripherial_Spi = (1<<2),
|
||||
EnabledBootloaderPeripherial_Can = (1<<3),
|
||||
EnabledBootloaderPeripherial_UsbHid = (1<<4),
|
||||
EnabledBootloaderPeripherial_UsbMsc = (1<<7),
|
||||
} enabled_bootloader_peripheral_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t tag; // Magic number to verify bootloader configuration is valid. Must be set to 'kcfg'.
|
||||
uint32_t reserved[3];
|
||||
@@ -39,6 +40,6 @@
|
||||
|
||||
// Functions:
|
||||
|
||||
extern void JumpToBootloaderoader(void);
|
||||
extern void JumpToBootloader(void);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user