zdaefa aefaef aefaefce aegaef aegaeg
2018-01-19
0 0 0
no vote
Other
Earn points
#include
void LED_Init(void);
int main()
{
uint32_t i;
//(1):configure the LEDs
HAL_Init();
LED_Init();
while(1)
{
//(1) : Toggle the LEDs
HAL_GPIO_TogglePin(GPIOD, GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15) ;
//(2) : wait for 1 sec
for (i=0;i<4000000;i++);// 1 Sec
}
}
void LED_Init(void)
{
GPIO_InitTypeDef LED_Init;
//(1):Enable port D clock
__HAL_RCC_GPIOD_CLK_ENABLE();
//(2):Initialisation LEDs
LED_Init.Pin= GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15 ;
LED_Init.Mode = GPIO_MODE_OUTPUT_PP;
LED_Init.Pull = GPIO_NOPULL ;
LED_Init.Speed =GPIO_SPEED_FREQ_LOW ;
HAL_GPIO_Init(GPIOD, &LED_Init);
}
void LED_Init(void);
int main()
{
uint32_t i;
//(1):configure the LEDs
HAL_Init();
LED_Init();
while(1)
{
//(1) : Toggle the LEDs
HAL_GPIO_TogglePin(GPIOD, GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15) ;
//(2) : wait for 1 sec
for (i=0;i<4000000;i++);// 1 Sec
}
}
void LED_Init(void)
{
GPIO_InitTypeDef LED_Init;
//(1):Enable port D clock
__HAL_RCC_GPIOD_CLK_ENABLE();
//(2):Initialisation LEDs
LED_Init.Pin= GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15 ;
LED_Init.Mode = GPIO_MODE_OUTPUT_PP;
LED_Init.Pull = GPIO_NOPULL ;
LED_Init.Speed =GPIO_SPEED_FREQ_LOW ;
HAL_GPIO_Init(GPIOD, &LED_Init);
}
Related Source Codes
Android AOA Android Open Accessory Development Usi
0
0
no vote
Golang AOA Android Open Accessory HID Control
0
0
no vote
PClite
0
0
no vote
GMSK Linear Receiver
0
0
no vote
The golden version of AFT that has been passed dow
0
0
no vote
No comment