kopia lustrzana https://github.com/SP8EBC/ParaTNC
29 wiersze
671 B
C
29 wiersze
671 B
C
/*
|
|
* LedConfig.c
|
|
*
|
|
* Created on: 05.07.2017
|
|
* Author: mateusz
|
|
*/
|
|
|
|
#include <stm32f10x.h>
|
|
|
|
|
|
void led_init(void) {
|
|
GPIO_InitTypeDef GPIO_InitStructure;
|
|
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;
|
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
|
|
GPIO_Init(GPIOC, &GPIO_InitStructure);
|
|
|
|
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8;
|
|
GPIO_Init(GPIOC, &GPIO_InitStructure);
|
|
|
|
GPIO_SetBits(GPIOC, GPIO_Pin_9 | GPIO_Pin_8);
|
|
|
|
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;
|
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
|
|
GPIO_Init(GPIOA, &GPIO_InitStructure);
|
|
|
|
}
|