EXTI interrupt abstraction feature complete
This commit is contained in:
@@ -22,11 +22,11 @@ extern "C" void EXTI##EXTI_Channel##_IRQHandler(void) { \
|
||||
};
|
||||
|
||||
#define DEFINE_MULTI_EXTI_IRQ(EXTI_Channel_Min, EXTI_Channel_Max) \
|
||||
extern "C" void EXTI##EXTI_Channel_Max##_##EXTI_Channel_Min##_IRQHandler(void) { \
|
||||
extern "C" void EXTI##EXTI_Channel_Min##_##EXTI_Channel_Max##_IRQHandler(void) { \
|
||||
for(uint8_t line = EXTI_Channel_Min; line <= EXTI_Channel_Max; line++){ \
|
||||
if (EXTI->PR & (1 << line)) { \
|
||||
EXTI->PR |= (1 << line); /*clear flag */ \
|
||||
auto cb = EXTI_callbacks[line]; \
|
||||
auto cb = EXTI_callbacks[line]; \
|
||||
if (cb) cb(); \
|
||||
}; \
|
||||
} \
|
||||
|
||||
@@ -209,7 +209,7 @@ constexpr SHAL_Peripheral_Register getGPIORCCEnable(const GPIO_Key g){
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
constexpr unsigned int getGPIOPortNumber(const GPIO_Key g){
|
||||
constexpr uint32_t getGPIOPortNumber(const GPIO_Key g){
|
||||
switch(g) {
|
||||
case GPIO_Key::A0:
|
||||
case GPIO_Key::A1:
|
||||
|
||||
@@ -17,13 +17,13 @@ class UART{
|
||||
public:
|
||||
|
||||
//begins Tx and Usart TODO either modify this function or add a new one that supports Rx
|
||||
void begin(uint32_t baudRate);
|
||||
void begin(uint32_t baudRate) volatile;
|
||||
|
||||
//Sends a string
|
||||
void sendString(const char* s);
|
||||
void sendString(const char* s) volatile;
|
||||
|
||||
//Sends a char
|
||||
void sendChar(char c);
|
||||
void sendChar(char c) volatile;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user