Change USART1 to LEDs for T0/T1 presence indication (@ Tcalc_screen_ver2)

This commit is contained in:
eddyem
2019-09-18 16:41:35 +03:00
parent 4bd57d704a
commit 8491f4bf90
13 changed files with 42 additions and 309 deletions

View File

@@ -26,9 +26,11 @@
static I2C_SPEED curI2Cspeed = LOW_SPEED;
void gpio_setup(void){
// PA9, PA10 - LEDs T0/T1
RCC->AHBENR |= RCC_AHBENR_GPIOCEN | RCC_AHBENR_GPIOBEN | RCC_AHBENR_GPIOAEN;
// Set LEDS (PA14/15)
GPIOA->MODER = GPIO_MODER_MODER14_O | GPIO_MODER_MODER15_O;
GPIOA->MODER = GPIO_MODER_MODER9_O | GPIO_MODER_MODER10_O |
GPIO_MODER_MODER14_O | GPIO_MODER_MODER15_O;
// PC13 - digital output - poweron
GPIOC->OTYPER = 1 << 13; // opendrain
GPIOC->MODER = GPIO_MODER_MODER13_O;