Fixed HW validation menu

Fixed some minor issues/bugs

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@284 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-11-21 12:36:16 +00:00
parent 5ccc28e32d
commit ff01d92ea8
23 changed files with 395 additions and 182 deletions

View File

@@ -58,22 +58,23 @@ typedef ErrorStatus (*DisplayResetFunction)(const struct DisplayDevice* self);
typedef ErrorStatus (*DisplaySetStateFunction)(const struct DisplayDevice* self, DisplayDevice_functionalState state);
typedef ErrorStatus (*DisplayBackspaceFunction)(const struct DisplayDevice* self);
typedef ErrorStatus (*DisplayCursorPositionFunction)(const struct DisplayDevice* self, unsigned int row, unsigned int column);
typedef ErrorStatus (*DisplayWriteFunction)(const struct DisplayDevice* self, const char* buffer, size_t length, size_t row, size_t column);
typedef ErrorStatus (*DisplayWriteFunction)(const struct DisplayDevice* self, const char* buffer, unsigned int length, unsigned int row, unsigned int column);
typedef ErrorStatus (*DisplayWriteCharacterFunction)(const struct DisplayDevice* self, const char* buffer, unsigned int row, unsigned int column);
typedef ErrorStatus (*DisplayClearFunction)(const struct DisplayDevice* self);
typedef ErrorStatus (*DisplayClearLineFunction)(const struct DisplayDevice* self, size_t row);
typedef ErrorStatus (*DisplaySetBrightnessFunction)(const struct DisplayDevice* self, size_t brightness);
typedef ErrorStatus (*DisplaySetContrastFunction)(const struct DisplayDevice* self, size_t contrast);
typedef ErrorStatus (*DisplayClearLineFunction)(const struct DisplayDevice* self, unsigned int row);
typedef ErrorStatus (*DisplaySetBrightnessFunction)(const struct DisplayDevice* self, unsigned int brightness);
typedef ErrorStatus (*DisplaySetContrastFunction)(const struct DisplayDevice* self, unsigned int contrast);
typedef ErrorStatus (*DisplayInvertFunction)(const struct DisplayDevice* self);
typedef ErrorStatus (*DisplaySetBlinkingCursor)(const struct DisplayDevice* self, DisplayDevice_functionalState state);
struct DisplayDeviceParameters
{
size_t numberOfRows;
size_t numberOfColumns;
size_t contrastMin;
size_t contrastMax;
size_t brightnessMin;
size_t brightnessMax;
unsigned int numberOfRows;
unsigned int numberOfColumns;
unsigned int contrastMin;
unsigned int contrastMax;
unsigned int brightnessMin;
unsigned int brightnessMax;
};
struct DisplayDevice
@@ -82,6 +83,7 @@ struct DisplayDevice
DisplaySetStateFunction _setState;
DisplayBackspaceFunction _backspace;
DisplayCursorPositionFunction _setCursorToPosition;
DisplayWriteCharacterFunction _writeCharacter;
DisplayWriteFunction _write;
DisplayClearFunction _clear;
DisplayClearLineFunction _clearLine;
@@ -102,6 +104,7 @@ extern ErrorStatus DisplayDevice_construct (struct DisplayDevice* self, struct D
DisplaySetStateFunction setState,
DisplayBackspaceFunction backspace,
DisplayCursorPositionFunction setCursorToPosition,
DisplayWriteCharacterFunction writeCharacter,
DisplayWriteFunction write,
DisplayClearFunction clear,
DisplayClearLineFunction clearLine,
@@ -114,11 +117,12 @@ extern ErrorStatus DisplayDevice_reset(const struct DisplayDevice* self);
extern ErrorStatus DisplayDevice_setState(const struct DisplayDevice* self, DisplayDevice_functionalState state);
extern ErrorStatus DisplayDevice_backspace(const struct DisplayDevice* self);
extern ErrorStatus DisplayDevice_setCursorToPosition(const struct DisplayDevice* self, unsigned int row, unsigned int column);
extern ErrorStatus DisplayDevice_write(const struct DisplayDevice* self, const char* buffer, size_t length, size_t row, size_t column);
extern ErrorStatus DisplayDevice_writeCharacter(const struct DisplayDevice* self, const char* buffer, unsigned int row, unsigned int column);
extern ErrorStatus DisplayDevice_write(const struct DisplayDevice* self, const char* buffer, unsigned int length, unsigned int row, unsigned int column);
extern ErrorStatus DisplayDevice_clear(const struct DisplayDevice* self);
extern ErrorStatus DisplayDevice_clearLine(const struct DisplayDevice* self, size_t row);
extern ErrorStatus DisplayDevice_setBrightness(const struct DisplayDevice* self, size_t brightness);
extern ErrorStatus DisplayDevice_setContrast(const struct DisplayDevice* self, size_t contrast);
extern ErrorStatus DisplayDevice_clearLine(const struct DisplayDevice* self, unsigned int row);
extern ErrorStatus DisplayDevice_setBrightness(const struct DisplayDevice* self, unsigned int brightness);
extern ErrorStatus DisplayDevice_setContrast(const struct DisplayDevice* self, unsigned int contrast);
extern ErrorStatus DisplayDevice_invert(const struct DisplayDevice* self);
extern ErrorStatus DisplayDevice_setBlinkingCursorState(const struct DisplayDevice* self, DisplayDevice_functionalState state);