Fixed issue with external DAC handlign from repair process
repair process implemented. Simple regulation without feedback (must be addeed, yet) HW validation menu functional but buggy (IOs not OK) Added ClearLine functionality to displayDevice git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@244 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -67,6 +67,7 @@ static int nhd0420_cursorRowOffset[NHD0420_NUMBER_OF_ROWS] =
|
||||
static ErrorStatus setState(const struct DisplayDevice* self, DisplayDevice_functionalState state);
|
||||
static ErrorStatus write(const struct DisplayDevice* self, const char* buffer, size_t length, size_t row, size_t column);
|
||||
static ErrorStatus clear(const struct DisplayDevice* self);
|
||||
static ErrorStatus clearLine(const struct DisplayDevice* self);
|
||||
static ErrorStatus setBrightness(const struct DisplayDevice* self, size_t brightness);
|
||||
static ErrorStatus setContrast(const struct DisplayDevice* self, size_t contrast);
|
||||
|
||||
@@ -92,7 +93,7 @@ ErrorStatus NHD0420_construct(struct NHD0420* self, const struct IODevice* devic
|
||||
ddParameters.brightnessMax = NHD0420_BRIGHTNESS_MAX;
|
||||
ddParameters.contrastMin = NHD0420_CONTRAST_MIN;
|
||||
ddParameters.contrastMax = NHD0420_CONTRAST_MAX;
|
||||
DisplayDevice_construct(&self->displayDevice, &ddParameters, NULL, setState, write, clear, setBrightness, setContrast, NULL);
|
||||
DisplayDevice_construct(&self->displayDevice, &ddParameters, NULL, setState, write, clear, clearLine, setBrightness, setContrast, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -416,6 +417,31 @@ static ErrorStatus clear(const struct DisplayDevice* self)
|
||||
}
|
||||
|
||||
|
||||
static ErrorStatus clearLine(const struct DisplayDevice* self, size_t row)
|
||||
{
|
||||
ErrorStatus returnValue = SUCCESS;
|
||||
|
||||
if (!self->initialized)
|
||||
{
|
||||
// Set cursor on display
|
||||
returnValue = NHD0420_setCursorToPosition((const struct NHD0420*)self, row, 1);
|
||||
|
||||
char buffer[self->parameters.numberOfColumns] = {0x20,};
|
||||
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
returnValue = NHD0420_sendData((const struct NHD0420*)self, buffer, self->parameters.numberOfColumns);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
returnValue = ERROR;
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
|
||||
static ErrorStatus setBrightness(const struct DisplayDevice* self, size_t brightness)
|
||||
{
|
||||
if (!self->initialized)
|
||||
|
||||
Reference in New Issue
Block a user