OK, USART works, maybe add HEX input?

This commit is contained in:
Edward Emelianov
2026-03-14 22:46:28 +03:00
parent 65c9ae34bc
commit 57a44f1c66
10 changed files with 61 additions and 45 deletions

View File

@@ -17,12 +17,12 @@
*/
#include "adc.h"
#include "gpio.h"
#include "gpioproto.h"
#include "hardware.h"
uint8_t ledsON = 0;
TRUE_INLINE void gpio_setup(){ // setup some common GPIO
TRUE_INLINE void pins_setup(){ // setup some common GPIO
// Set LEDS (PB15/PA8) as output
pin_set(LED0_port, LED0_pin); // clear LEDs
pin_set(LED1_port, LED1_pin);
@@ -37,9 +37,9 @@ void hardware_setup(){
RCC->AHBENR |= RCC_AHBENR_GPIOAEN | RCC_AHBENR_GPIOBEN | RCC_AHBENR_DMA1EN;
RCC->APB2ENR |= RCC_APB2ENR_USART1EN | RCC_APB2ENR_SYSCFGEN;
RCC->APB1ENR |= RCC_APB1ENR_USART2EN;
gpio_setup();
//gpio_reinit();
pins_setup();
adc_setup();
GPIO_init();
}
void iwdg_setup(){