removed default interrupt handling implementation
This commit is contained in:
parent
9a9b59ea9e
commit
b578a70870
|
@ -109,8 +109,7 @@ void rbInit() {
|
||||||
gpioSetPullup (&RB_BUSINT_IO, gpioPullupMode_PullUp);
|
gpioSetPullup (&RB_BUSINT_IO, gpioPullupMode_PullUp);
|
||||||
gpioSetInterrupt(RB_BUSINT, gpioInterruptSense_Edge, gpioInterruptEdge_Single, gpioInterruptEvent_ActiveLow);
|
gpioSetInterrupt(RB_BUSINT, gpioInterruptSense_Edge, gpioInterruptEdge_Single, gpioInterruptEvent_ActiveLow);
|
||||||
gpioIntEnable(RB_BUSINT);
|
gpioIntEnable(RB_BUSINT);
|
||||||
// 1. remove PIOINT3_IRQHandler from gpio/gpio.c
|
// add this to catch interrupt:
|
||||||
// 2. add this to catch interrupt:
|
|
||||||
/*
|
/*
|
||||||
void PIOINT3_IRQHandler(void) {
|
void PIOINT3_IRQHandler(void) {
|
||||||
if (gpioIntStatus(RB_BUSINT)) {
|
if (gpioIntStatus(RB_BUSINT)) {
|
||||||
|
|
|
@ -49,86 +49,6 @@ volatile uint32_t chibi_counter = 0;
|
||||||
|
|
||||||
static bool _gpioInitialised = false;
|
static bool _gpioInitialised = false;
|
||||||
|
|
||||||
/**************************************************************************/
|
|
||||||
/*!
|
|
||||||
@brief IRQ Handler for GPIO port 0 (currently checks pin 0.1)
|
|
||||||
*/
|
|
||||||
/**************************************************************************/
|
|
||||||
void PIOINT0_IRQHandler(void)
|
|
||||||
{
|
|
||||||
uint32_t regVal;
|
|
||||||
|
|
||||||
regVal = gpioIntStatus(0, 1);
|
|
||||||
if (regVal)
|
|
||||||
{
|
|
||||||
gpioIntClear(0, 1);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************************************************************************/
|
|
||||||
/*!
|
|
||||||
@brief IRQ Handler for GPIO port 1 (currently checks pin 1.1)
|
|
||||||
*/
|
|
||||||
/**************************************************************************/
|
|
||||||
void PIOINT1_IRQHandler(void)
|
|
||||||
{
|
|
||||||
uint32_t regVal;
|
|
||||||
|
|
||||||
#ifdef CFG_CHIBI
|
|
||||||
// Check for interrupt on 1.8
|
|
||||||
regVal = gpioIntStatus(1, 8);
|
|
||||||
if (regVal)
|
|
||||||
{
|
|
||||||
chibi_counter++;
|
|
||||||
chb_ISR_Handler();
|
|
||||||
gpioIntClear(1, 8);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
regVal = gpioIntStatus(1, 1);
|
|
||||||
if ( regVal )
|
|
||||||
{
|
|
||||||
gpioIntClear(1, 1);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************************************************************************/
|
|
||||||
/*!
|
|
||||||
@brief IRQ Handler for GPIO port 2 (currently checks pin 2.1)
|
|
||||||
*/
|
|
||||||
/**************************************************************************/
|
|
||||||
void PIOINT2_IRQHandler(void)
|
|
||||||
{
|
|
||||||
uint32_t regVal;
|
|
||||||
|
|
||||||
regVal = gpioIntStatus(2, 1);
|
|
||||||
if ( regVal )
|
|
||||||
{
|
|
||||||
gpioIntClear(2, 1);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************************************************************************/
|
|
||||||
/*!
|
|
||||||
@brief IRQ Handler for GPIO port 3 (currently checks pin 3.1)
|
|
||||||
*/
|
|
||||||
/**************************************************************************/
|
|
||||||
void PIOINT3_IRQHandler(void)
|
|
||||||
{
|
|
||||||
uint32_t regVal;
|
|
||||||
|
|
||||||
regVal = gpioIntStatus(3, 1);
|
|
||||||
if ( regVal )
|
|
||||||
{
|
|
||||||
gpioIntClear(3, 1);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
/*!
|
/*!
|
||||||
@brief Initialises GPIO and enables the GPIO interrupt
|
@brief Initialises GPIO and enables the GPIO interrupt
|
||||||
|
|
Loading…
Reference in New Issue