Commit for SWO for HW validation menu updates

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@245 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-10 12:46:41 +00:00
parent a73154a5e6
commit a688a6549a
19 changed files with 720 additions and 89 deletions

View File

@@ -31,6 +31,11 @@
// Include files
// -----------------------------------------------------------------------------
#include <stdbool.h>
#include "stm32f10x.h"
#include "keypadMatrix.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
@@ -43,10 +48,30 @@
// -----------------------------------------------------------------------------
struct KeyboardDevice;
typedef ErrorStatus (*KeyboardReadFunction)(const struct KeyboardDevice* self, char* buffer, Keypad_KeyState* keyState);
struct KeyboardDeviceParameters
{
int numberOfKeys;
};
struct KeyboardDevice
{
KeyboardReadFunction _read;
struct KeyboardDeviceParameters parameters;
bool initialized;
};
// -----------------------------------------------------------------------------
// Function declarations
// -----------------------------------------------------------------------------
extern ErrorStatus KeyboardDevice_construct (struct KeyboardDevice* self, struct KeyboardDeviceParameters* parameters, KeyboardReadFunction read);
extern ErrorStatus KeyboardDevice_read(const struct KeyboardDevice* self, char* buffer, Keypad_KeyState* keyState);
#endif /* INC_KEYBOARDDEVICE_H_ */