36 #if defined(PIOS_INCLUDE_SYS)
38 #define MEM8(addr) (*((volatile uint8_t *)(addr)))
41 static void NVIC_Configuration(
void);
72 RCC_AHBPeriphClockCmd(
87 RCC_APB1PeriphClockCmd(
92 RCC_APB1Periph_TIM14 |
95 RCC_APB1Periph_USART2 |
101 RCC_APB2PeriphClockCmd(
102 RCC_APB2Periph_SYSCFG |
103 RCC_APB2Periph_ADC1 |
104 RCC_APB2Periph_TIM1 |
105 RCC_APB2Periph_SPI1 |
106 RCC_APB2Periph_USART1 |
107 RCC_APB2Periph_TIM15 |
108 RCC_APB2Periph_TIM16 |
109 RCC_APB2Periph_TIM17 |
110 RCC_APB2Periph_DBGMCU |
130 #if defined(PIOS_LED_HEARTBEAT)
133 #if defined(PIOS_LED_ALARM)
160 uint8_t b = MEM8(0x1ffff7ac + i);
181 uint8_t b = MEM8(0x1ffff7ac + (i / 2));
186 str[
i] = ((b > 9) ? (
'A' - 10) :
'0') + b;
207 static void NVIC_Configuration(
void)
210 SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK);
213 #ifdef USE_FULL_ASSERT
221 void assert_failed(uint8_t * file, uint32_t line)
227 #if defined(PIOS_LED_HEARTBEAT)
230 #if defined(PIOS_LED_ALARM)
236 #if defined(PIOS_LED_HEARTBEAT)
239 #if defined(PIOS_LED_ALARM)
242 for (
int i = 0; i < 1000000; i++) ;
Main PiOS header to include all the compiled in PiOS options.
void SystemCoreClockUpdate(void)
Update SystemCoreClock variable according to Clock Register Values. The SystemCoreClock variable cont...
#define PIOS_SYS_SERIAL_NUM_BINARY_LEN
int32_t PIOS_DELAY_Init(void)
void PIOS_ANNUNC_Off(uint32_t annunc_id)
void SystemInit(void)
Setup the microcontroller system Initialize the Embedded Flash Interface, the PLL and update the Syst...
#define PIOS_SYS_SERIAL_NUM_ASCII_LEN
void PIOS_ANNUNC_On(uint32_t annunc_id)
int32_t PIOS_SYS_Reset(void)
size_t PIOS_SYS_OsStackUnused(void)
int32_t PIOS_IRQ_Disable(void)
int32_t PIOS_SYS_SerialNumberGet(char str[PIOS_SYS_SERIAL_NUM_ASCII_LEN+1])
void PIOS_ANNUNC_Toggle(uint32_t annunc_id)
size_t PIOS_SYS_IrqStackUnused(void)
#define PIOS_LED_HEARTBEAT
int32_t PIOS_SYS_SerialNumberGetBinary(uint8_t array[PIOS_SYS_SERIAL_NUM_BINARY_LEN])