Most parts of the menu structure are functional.

Error handler added
Screens for warning, pause, FINISH etc yet to be added

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@255 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-17 15:23:56 +00:00
parent e201de0d97
commit 088ce81dc7
17 changed files with 883 additions and 161 deletions

View File

@@ -54,11 +54,12 @@
// Function definitions
// -----------------------------------------------------------------------------
ErrorStatus Interlock_construct(struct Interlock* self, struct Gpio* NO, EXTI_InitTypeDef NOEXTI, struct Gpio* NC, EXTI_InitTypeDef NCEXTI)
ErrorStatus Interlock_construct(struct Interlock* self, T_INTERLOCK_ID ID, struct Gpio* NO, EXTI_InitTypeDef NOEXTI, struct Gpio* NC, EXTI_InitTypeDef NCEXTI)
{
ErrorStatus returnValue = SUCCESS;
if (!self->initialized)
{
self->ID = ID;
self->NO.io = NO;
self->NO.ioEXTI = NOEXTI;
self->NC.io = NC;
@@ -77,8 +78,9 @@ void Interlock_getStatus(struct Interlock* self, FunctionalState* command, int*
{
*command = self->NO.ioEXTI.EXTI_LineCmd;
IODevice_read((struct IODevice*)self->NO.io, (char*)NO, 1, NULL);
IODevice_read((struct IODevice*)self->NC.io, (char*)NC, 1, NULL);
size_t actualLength;
IODevice_read((struct IODevice*)self->NO.io, (char*)NO, 1, &actualLength);
IODevice_read((struct IODevice*)self->NC.io, (char*)NC, 1, &actualLength);
}
@@ -88,9 +90,10 @@ bool Interlock_isClosed(struct Interlock* self)
char no;
char nc;
size_t actualLength;
IODevice_read((struct IODevice*)self->NO.io, &no, 1, NULL);
IODevice_read((struct IODevice*)self->NC.io, &nc, 1, NULL);
IODevice_read((struct IODevice*)self->NO.io, &no, 1, &actualLength);
IODevice_read((struct IODevice*)self->NC.io, &nc, 1, &actualLength);
if ((no != 0) && (nc == 0))
{