Updates on the IODevice structure.
Display and Logger fully functional. Keypad task completed - yet to be tested git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@219 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -31,10 +31,11 @@
|
||||
#include "semphr.h"
|
||||
|
||||
#include "stm32f10x_it.h"
|
||||
#include "Logger.h"
|
||||
|
||||
#include "stm32f10x_exti.h"
|
||||
|
||||
#include "Logger.h"
|
||||
#include "keypadMatrix.h"
|
||||
#include "led.h"
|
||||
#include "platform.h"
|
||||
#include "spi.h"
|
||||
@@ -72,7 +73,6 @@ void IRQ_setInterruptProperties(uint8_t irqChannel, uint8_t preemptionPriority,
|
||||
{
|
||||
NVIC_InitTypeDef NVIC_InitStructure; //! Define empty NVIC structure
|
||||
|
||||
//! Configure the USARTx Interrupt
|
||||
NVIC_InitStructure.NVIC_IRQChannel = irqChannel;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = preemptionPriority;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = subPriority;
|
||||
@@ -81,7 +81,18 @@ void IRQ_setInterruptProperties(uint8_t irqChannel, uint8_t preemptionPriority,
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
}
|
||||
|
||||
/**
|
||||
void IRQ_setKeypadEXTI(struct Keypad* self, FunctionalState command)
|
||||
{
|
||||
int colCounter;
|
||||
for (colCounter = 0; colCounter < KEYPAD_NUMBER_OF_COLUMNS; colCounter++)
|
||||
{
|
||||
self->column[colCounter].EXTI_InitStruct.EXTI_LineCmd = command;
|
||||
EXTI_Init(&self->column[colCounter].EXTI_InitStruct);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief This function handles SVCall exception.
|
||||
* @param None
|
||||
* @retval None
|
||||
@@ -268,13 +279,16 @@ void SPI3_IRQHandler (void)
|
||||
portEND_SWITCHING_ISR(higherPriorityTaskWoken);
|
||||
}
|
||||
|
||||
|
||||
void EXTI4_IRQHandler(void)
|
||||
{
|
||||
static signed portBASE_TYPE higherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
IRQ_setKeypadEXTI(keypad, DISABLE);
|
||||
xSemaphoreGiveFromISR(keypad->scanSemaphore, &higherPriorityTaskWoken);
|
||||
|
||||
LOGGER_INFO_ISR("EXT4 ISR");
|
||||
|
||||
|
||||
EXTI_ClearITPendingBit(EXTI_Line4);
|
||||
|
||||
portEND_SWITCHING_ISR(higherPriorityTaskWoken);
|
||||
@@ -286,16 +300,22 @@ void EXTI9_5_IRQHandler (void)
|
||||
|
||||
if (EXTI_GetITStatus(EXTI_Line5) != RESET)
|
||||
{
|
||||
IRQ_setKeypadEXTI(keypad, DISABLE);
|
||||
xSemaphoreGiveFromISR(keypad->scanSemaphore, &higherPriorityTaskWoken);
|
||||
LOGGER_INFO_ISR("EXT5 ISR");
|
||||
EXTI_ClearITPendingBit(EXTI_Line5);
|
||||
}
|
||||
else if (EXTI_GetITStatus(EXTI_Line6) != RESET)
|
||||
{
|
||||
IRQ_setKeypadEXTI(keypad, DISABLE);
|
||||
xSemaphoreGiveFromISR(keypad->scanSemaphore, &higherPriorityTaskWoken);
|
||||
LOGGER_INFO_ISR("EXT6 ISR");
|
||||
EXTI_ClearITPendingBit(EXTI_Line6);
|
||||
}
|
||||
else if (EXTI_GetITStatus(EXTI_Line7) != RESET)
|
||||
{
|
||||
IRQ_setKeypadEXTI(keypad, DISABLE);
|
||||
xSemaphoreGiveFromISR(keypad->scanSemaphore, &higherPriorityTaskWoken);
|
||||
LOGGER_INFO_ISR("EXT7 ISR");
|
||||
EXTI_ClearITPendingBit(EXTI_Line7);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user