#include "porting.h" #include void initAliveLED(void) { /* Activate clock for peripheral. */ RCC_APB2PeriphClockCmd(GPIO_BUS_ALIVE, ENABLE); /* Initialize GPIO Pin. */ GPIO_InitTypeDef GPIO_InitStructure ; GPIO_StructInit (&GPIO_InitStructure ); GPIO_InitStructure.GPIO_Pin = GPIO_PIN_ALIVE ; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP ; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz ; GPIO_Init (GPIO_ALIVE, & GPIO_InitStructure ); } void toggleAliveLED(void) { static volatile uint8_t led_stat = 0; led_stat = !led_stat; GPIO_WriteBit(GPIO_ALIVE, GPIO_PIN_ALIVE, led_stat); }