Issue: cannot read core
This commit is contained in:
@@ -6,7 +6,23 @@
|
||||
#define SHMINGO_HAL_SHAL_EXTI_REG_L432KC_H
|
||||
|
||||
#include "SHAL_CORE.h"
|
||||
#include "SHAL_EXTI_TYPES.h"
|
||||
|
||||
#define EXTI_PENDING_REG(line) ((line) < 32 ? EXTI->PR1 : EXTI->PR2)
|
||||
|
||||
static inline SHAL_EXTI_Interrupt_Mask_Register getEXTIInterruptMaskRegister(uint32_t line){
|
||||
auto imr = line < 32 ? EXTI->IMR1 : EXTI->IMR2;
|
||||
return {&imr};
|
||||
}
|
||||
|
||||
static inline SHAL_EXTI_Rising_Trigger_Selection_Register getEXTIRisingTriggerSelectionRegister(uint32_t line){
|
||||
auto reg = line < 32 ? EXTI->RTSR1 : EXTI->RTSR2;
|
||||
return {®};
|
||||
}
|
||||
|
||||
static inline SHAL_EXTI_Falling_Trigger_Selection_Register getEXTIFallingTriggerSelectionRegister(uint32_t line){
|
||||
auto reg = line < 32 ? EXTI->FTSR1 : EXTI->FTSR2;
|
||||
return {®};
|
||||
}
|
||||
|
||||
#endif //SHMINGO_HAL_SHAL_EXTI_REG_L432KC_H
|
||||
|
||||
22
SHAL/Include/Peripheral/EXT/SHAL_EXTI_TYPES.h
Normal file
22
SHAL/Include/Peripheral/EXT/SHAL_EXTI_TYPES.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Created by Luca on 10/17/2025.
|
||||
//
|
||||
|
||||
#ifndef SHMINGO_HAL_SHAL_EXTI_TYPES_H
|
||||
#define SHMINGO_HAL_SHAL_EXTI_TYPES_H
|
||||
|
||||
#include "SHAL_CORE.h"
|
||||
|
||||
struct SHAL_EXTI_Interrupt_Mask_Register {
|
||||
volatile uint32_t* reg;
|
||||
};
|
||||
|
||||
struct SHAL_EXTI_Rising_Trigger_Selection_Register {
|
||||
volatile uint32_t* reg;
|
||||
};
|
||||
|
||||
struct SHAL_EXTI_Falling_Trigger_Selection_Register {
|
||||
volatile uint32_t* reg;
|
||||
};
|
||||
|
||||
#endif //SHMINGO_HAL_SHAL_EXTI_TYPES_H
|
||||
Reference in New Issue
Block a user