Test program done

This commit is contained in:
Luca Lizaranzu
2026-03-20 11:41:44 -07:00
parent 303a554595
commit 1b29371fff
20 changed files with 1037 additions and 114 deletions

View File

@@ -63,7 +63,8 @@ static SHAL_UART_Control_Register_1 getUARTControlRegister1(const UART_Pair_Key
USART_CR1_TE,
USART_CR1_RE,
USART_CR1_M0,
USART_CR1_M1
USART_CR1_M1,
USART_CR1_RXNEIE
};
res.reg = &getUARTPair(key).USARTReg->CR1;
@@ -90,7 +91,7 @@ static SHAL_UART_ISR getUARTISR(const UART_Pair_Key key) { //TODO Support for mu
}
static SHAL_UART_Transmit_Data_Register getUARTTransmitDataRegister(const UART_Pair_Key key) {
return {&getUARTPair(key).USARTReg->CR1};
return {&getUARTPair(key).USARTReg->TDR};
}
static

View File

@@ -23,10 +23,9 @@ public:
void begin(uint32_t baudRate, SHAL_USART_Word_Length wordLength) const volatile;
//Sends a string
void sendString(const char* s) volatile;
void sendString(const char* s) const volatile;
//Sends a char
void sendChar(char c) volatile;
void sendChar(char c) const volatile;
private:

View File

@@ -29,6 +29,7 @@ struct SHAL_UART_Control_Register_1 {
uint32_t receive_enable_mask;
uint32_t m0_mask;
uint32_t m1_mask;
uint32_t Rx_interrupt_enable_mask;
};
struct SHAL_UART_Baud_Rate_Generation_Register {