wip working usart, not receiving over tty
This commit is contained in:
@@ -114,10 +114,18 @@ struct rcc {
|
||||
#define RCC_CFGR_SW_MASK (0b11)
|
||||
#define RCC_CFGR_SW(clock) ((clock & RCC_CFGR_SW_MASK) << RCC_CFGR_SW_BIT)
|
||||
|
||||
// AHB1ENR Register
|
||||
// GPIOA AHB1ENR
|
||||
#define RCC_AHB1ENR_GPIOAEN_BIT 0
|
||||
#define RCC_AHB1ENR_GPIOAEN_ENABLE (1 << RCC_AHB1ENR_GPIOAEN_BIT)
|
||||
|
||||
// APB1ENR Register
|
||||
#define RCC_APB1ENR_PWREN_BIT 28
|
||||
#define RCC_APB1ENR_PWREN_CLOCK_ENABLE (1 << RCC_APB1ENR_PWREN_BIT)
|
||||
|
||||
#define RCC_APB1ENR_USART2EN_BIT 17
|
||||
#define RCC_APB1ENR_USART2EN_ENABLE (1 << RCC_APB1ENR_USART2EN_BIT)
|
||||
|
||||
#define RCC_APB1ENR_TIM4_BIT 2
|
||||
#define RCC_APB1ENR_TIM4_ENABLE (1 << RCC_APB1ENR_TIM4_BIT)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user