55 #include <stm32f4xx_conf.h> 69 D0=0,
D1,
D2,
D3,
D4,
D5,
D6,
D7,
D8,
D9,
70 D10,
D11,
D12,
D13,
D14,
D15,
D16,
D17,
D18,
D19,
71 D20,
D21,
D22,
D23,
D24,
D25,
D26,
D27,
D28,
D29,
72 D30,
D31,
D32,
D33,
D34,
D35,
D36,
D37,
D38,
D39,
73 D40,
D41,
D42,
D43,
D44,
D45,
D46,
D47,
D48,
D49,
74 D50,
D51,
D52,
D53,
D54,
D55,
D56,
D57,
D58,
D59,
75 D60,
D61,
D62,
D63,
D64,
D65,
D66,
D67,
D68,
D69,
76 D70,
D71,
D72,
D73,
D74,
D75,
D76,
D77,
D78,
D79,
77 D80,
D81,
D82,
D83,
D84,
D85,
D86,
D87,
D88,
D89,
78 D90,
D91,
D92,
D93,
D94,
D95,
D96,
D97,
D98,
D99,
79 D100,
D101,
D102,
D103,
D104,
D105,
D106,
D107,
D108,
D109,
136 static inline void goDFU();
139 ldr r0, =0x1FFF0000\n\ 150 return (uint32_t)&__isr_vector_start == 0x08000000;
167 #ifndef BOARD_NR_GPIO_PINS 168 #error "Board type has not been selected correctly." 286 #define CLOCK_SPEED_MHZ CYCLES_PER_MICROSECOND 287 #define CLOCK_SPEED_HZ (CLOCK_SPEED_MHZ * 1000000UL) 291 #define BOOT_RTC_SIGNATURE 0xb007b007 292 #define DFU_RTC_SIGNATURE 0xDEADBEEF 293 #define FORCE_APP_RTC_SIGNATURE 0x4000AbbA 296 #define DSM_BIND_SIGNATURE 0xD82B14D0 // "DSMBIND" last nibble for DSM code 297 #define DSM_BIND_SIGN_MASK 0xF // mask for last nibble - DSM code 299 #define CONSOLE_PORT_SIGNATURE 0xC07501e0 // "console" last nibble for port number 300 #define CONSOLE_PORT_MASK 0xF // mask for last nibble - port number 303 #define MASS_STORAGE_SIGNATURE 0x5106a8ed // "storaged" 306 #define OVERCLOCK_SIGNATURE 0xFACED1A0 // "FaceDia" last nibble for mode 307 #define OVERCLOCK_SIG_MASK 0xF // mode mask 308 #define OV_GUARD_SIGNATURE 0xBABEFACE // 309 #define OV_GUARD_FAIL_SIGNATURE 0xBABEFA17 312 #define RTC_SIGNATURE_REG 0 313 #define RTC_DSM_BIND_REG 1 314 #define RTC_MASS_STORAGE_REG 2 315 #define RTC_CONSOLE_REG 3 316 #define RTC_OVERCLOCK_REG 4 317 #define RTC_OV_GUARD_REG 5 322 #define digitalPinToPort(P) ( PIN_MAP[P].gpio_device ) 323 #define digitalPinToBitMask(P) ( BIT(PIN_MAP[P].gpio_bit) ) 324 #define portOutputRegister(port) ( &(port->regs->ODR) ) 325 #define portInputRegister(port) ( &(port->regs->IDR) ) 327 #define portSetRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->BSRR) ) 328 #define portClearRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->BRR) ) 330 #define portConfigRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->CRL) ) void(* voidFuncPtr)(void)
const adc_dev *const adc_device
void board_set_rtc_register(uint32_t sig, uint16_t reg)
const stm32_pin_info PIN_MAP[]
Maps each Maple pin to a corresponding stm32_pin_info.
void boardInit(void)
Board-specific initialization function.
timer_Channel timer_channel
Analog-to-Digital Conversion (ADC) header.
void SetSysClock(uint8_t oc)
Configures the System clock source, PLL Multiplier and Divider factors, AHB/APBx prescalers and Flash...
struct stm32_pin_info stm32_pin_info
Stores STM32-specific information related to a given Maple pin.
void clock_gettime(uint32_t mode, void *ptr)
const timer_dev *const timer_device
unsigned __isr_vector_start
void init(void)
Generic board initialization function.
uint32_t board_get_rtc_register(uint16_t reg)
void emerg_delay(uint32_t n)
void systemInit(uint8_t oc)
Setup the microcontroller system Initialize the Embedded Flash Interface, the PLL and update the Syst...
static bool is_bare_metal()
Stores STM32-specific information related to a given Maple pin.
voidFuncPtr boardEmergencyHandler
const gpio_dev *const gpio_device