update for SWO - hw validation menu integrated

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@239 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-06 07:46:54 +00:00
parent ab3301889c
commit 5105d55089
12 changed files with 143 additions and 84 deletions

View File

@@ -32,6 +32,8 @@
// Include files
// -----------------------------------------------------------------------------
#include <stdbool.h>
#include "FreeRTOS.h"
#include "semphr.h"
#include "task.h"
@@ -76,14 +78,14 @@ struct Keypad
struct keypadElement column[KEYPAD_NUMBER_OF_COLUMNS];
Keypad_KeyState lastState[KEYPAD_NUMBER_OF_ROWS][KEYPAD_NUMBER_OF_COLUMNS];
xTaskHandle taskHandle;
int taskPriority;
uint16_t stackSize;
SemaphoreHandle_t scanSemaphore;
xQueueHandle rxQueue;
size_t rxQueueSize;
bool initialized;
int waitToDebounce_ms;
};
struct KeypadParameters
{
int rxQueueSize;
};
// -----------------------------------------------------------------------------
@@ -95,8 +97,9 @@ struct KeypadParameters
* contructor for the Keypad driver
*
* @param self Keypad object to initialize
* @param parameters Parameters to use for initialisation
* @param debounceTime debounce time for the keypad to use
* @param taskPriority Priority of the keypad task
* @param stackSize Stacksize for the task
*
* @return ErrorStatus SUCCESS if initialisation was successful
* ERROR otherwise
@@ -104,7 +107,7 @@ struct KeypadParameters
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus Keypad_construct(struct Keypad* self, struct KeypadParameters* parameters, int debounceTime);
extern ErrorStatus Keypad_construct(struct Keypad* self, int debounceTime, int taskPriority, uint16_t stackSize, size_t rxQueueSize);
/** ----------------------------------------------------------------------------
@@ -121,21 +124,6 @@ extern ErrorStatus Keypad_construct(struct Keypad* self, struct KeypadParameters
*/
extern void Keypad_destruct (const struct Keypad* self);
/** ----------------------------------------------------------------------------
* Keypad_getDefaultParameters
* Returns default parameters for a keypad
*
* @param parameters Keypad parameters struct that will be
* filled with default values
*
* @return ErrorStatus SUCCESS if initialisation was successful
* ERROR otherwise
*
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus Keypad_getDefaultParameters(struct KeypadParameters* parameters);
#endif /* KEYPAD_INC_KEYPADMATRIX_H_ */