work on getting it to work. problems still remain with linking the interrupt files into the project (it seems so)

interrupts
polymurph 3 years ago
parent 62daf52da2
commit 87cb57bfab

@ -312,7 +312,7 @@ typedef enum {
TIM2_CAPTURECOMPARE_3,
TIM2_CAPTURECOMAPRE_4,
intTypeEND
}intType_t;
}intrType_t;
uint32_t intHandlerList[intTypeEND]={
0,0,0,0,0,0,0,0,0,0};

@ -1,10 +1,11 @@
#include "interrupt.h"
static void defaultHandler(){};
// pointers to dedicated interrupt handlers
void intInit(
intType_t intType,
intrType_t intType,
intHandler_t handler,
uint8_t priority)
{
@ -25,15 +26,15 @@ void intDissableAll()
}
void intEnable(
intType_t intType)
intrType_t intType)
{
NVIC_EnableIRQ(interruptTypeIndexList[intType]);
}
void intDissable(
intType_t intType)
intrType_t intType)
{
NVIC_DisableIRQ(interruptTypeIndexList[intType]);
}
// Interrupt service routines

@ -75,3 +75,4 @@ list(APPEND EXTRA_LIBS sub::max7219)
list(APPEND EXTRA_LIBS sub::spi)
list(APPEND EXTRA_LIBS sub::i2c)
list(APPEND EXTRA_LIBS sub::pin)
list(APPEND EXTRA LIBS sub::interrupt)

@ -27,7 +27,6 @@ extern "C" {
/*! interrupt callback type for the handler */
typedef void (*intHandler_t)(void);
// TODO: showe this into hardware description
/**
* @brief Initialize Interrupt
*
@ -47,7 +46,7 @@ typedef void (*intHandler_t)(void);
* @param priority the interrupt priority
*/
void intInit(
intType_t intType,
intrType_t intType,
intHandler_t handler,
uint8_t priority);
@ -77,7 +76,7 @@ void intDisableAll();
* @param intType interrupt type
*/
void intEnable(
intType_t intType);
intrType_t intType);
/**
@ -91,7 +90,7 @@ void intEnable(
* @param intType interrupt type
*/
void intDisable(
intType_t intType);
intrType_t intType);
#ifdef __cplusplus
}

Loading…
Cancel
Save