Updated HW test items for SWo

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@248 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-11 07:19:14 +00:00
parent b32a1c107f
commit 129f76f19b
10 changed files with 179 additions and 60 deletions

View File

@@ -83,6 +83,8 @@ extern struct Keypad* const keypad;
extern struct Gpio* const ledGreen;
extern struct Gpio* const ledOrange;
extern struct Gpio* const power6v5Enable;
extern struct Gpio* const tesla1;
extern struct Gpio* const tesla2;
extern struct Gpio* const interlock1;
extern struct Gpio* const interlock2;
extern struct Gpio* const solenoid;

View File

@@ -157,11 +157,15 @@ static ErrorStatus read(const struct IODevice* self, char* buffer, size_t length
{
struct KeypadQueueItem rxQueueItem;
if (xQueueReceive(keypad->rxQueue, &rxQueueItem, portMAX_DELAY) == pdTRUE)
if (xQueueReceive(keypad->rxQueue, &rxQueueItem, 0) == pdTRUE)
{
*actualLength = sizeof(struct KeypadQueueItem) / sizeof (char);
memcpy(buffer, &rxQueueItem, sizeof(struct KeypadQueueItem) / sizeof (char));
}
else
{
returnValue = ERROR;
}
}
else
{

View File

@@ -124,6 +124,8 @@ static struct Gpio _ledOrange = {.initialized = false};
static struct Gpio _power6v5Enable = {.initialized = false};
static struct Gpio _interlock1 = {.initialized = false};
static struct Gpio _interlock2 = {.initialized = false};
static struct Gpio _tesla1 = {.initialized = false};
static struct Gpio _tesla2 = {.initialized = false};
static struct Gpio _solenoid = {.initialized = false};
static struct Gpio _mcp0Relay = {.initialized = false};
static struct Gpio _mcp1Relay = {.initialized = false};
@@ -167,6 +169,8 @@ struct Gpio* const ledOrange = &_ledOrange;
struct Gpio* const power6v5Enable = & _power6v5Enable;
struct Gpio* const interlock1 = &_interlock1;
struct Gpio* const interlock2 = &_interlock2;
struct Gpio* const tesla1 = &_tesla1;
struct Gpio* const tesla2 = &_tesla2;
struct Gpio* const solenoid = & _solenoid;
struct Gpio* const mcp0Relay = &_mcp0Relay;
struct Gpio* const mcp1Relay = &_mcp1Relay;