Updated all GPIO to PCBA updated version
Added LED module git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@321 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
#include "CathodeMCP.h"
|
||||
#include "CoverSolenoid.h"
|
||||
#include "Interlock.h"
|
||||
#include "Leds.h"
|
||||
#include "Logger.h"
|
||||
#include "nhd0420.h"
|
||||
#include "TeslaGunSafety.h"
|
||||
@@ -73,7 +74,7 @@ tick hook. */
|
||||
|
||||
struct LedTaskArguments
|
||||
{
|
||||
struct Gpio* led;
|
||||
Led led;
|
||||
int frequency;
|
||||
};
|
||||
|
||||
@@ -119,7 +120,7 @@ int main (void)
|
||||
|
||||
// Create TaskHandles
|
||||
|
||||
ledTaskArguments.led = ledOrange;
|
||||
ledTaskArguments.led = LED_ONBOARD_ORANGE;
|
||||
ledTaskArguments.frequency = 1;
|
||||
|
||||
xTaskCreate(initTask, (const char* const)"initTask", 1024, NULL, 5, &initTaskHandle);
|
||||
@@ -192,6 +193,12 @@ static void initTask(void* parameters)
|
||||
initPlatform();
|
||||
}
|
||||
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
// Construct the LEDs
|
||||
Led_construct();
|
||||
}
|
||||
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
// Construct the displays
|
||||
@@ -235,7 +242,7 @@ static void initTask(void* parameters)
|
||||
hwTestItems.display = &nhd0420->displayDevice;
|
||||
hwTestItems.internalADC = adc1;
|
||||
hwTestItems.externalDAC = max5715;
|
||||
hwTestItems.power6v5Enable = Power6V5Supply_getGPIO();
|
||||
// hwTestItems.power6v5Enable = Power6V5Supply_getGPIO();
|
||||
hwTestItems.interlockNO = interlock->NO.io;
|
||||
hwTestItems.interlockNC = interlock->NC.io;
|
||||
hwTestItems.TeslaSecurity = TeslaGunSafety_getGpio();
|
||||
@@ -249,7 +256,7 @@ static void initTask(void* parameters)
|
||||
hwTestItems.pcba = PCBA_getInstance();
|
||||
hwTestItems.keypad = keypad;
|
||||
// EEPROM TO BE DONE
|
||||
HwValidationMenu_construct(hwValidation, &uart1->device, &hwTestItems, 1, 1024);
|
||||
HwValidationMenu_construct(hwValidation, &uart3->device, &hwTestItems, 1, 1024);
|
||||
}
|
||||
#endif
|
||||
if (returnValue == SUCCESS)
|
||||
@@ -273,17 +280,15 @@ static void initTask(void* parameters)
|
||||
|
||||
static void ledBlinkTask (void* parameters)
|
||||
{
|
||||
char high = 1;
|
||||
char low = 0;
|
||||
char indicator[2];
|
||||
indicator[0] = ' ';
|
||||
indicator[1] = '\0';
|
||||
struct LedTaskArguments* arguments = (struct LedTaskArguments*) parameters;
|
||||
struct Gpio* gpio = arguments->led;
|
||||
int frequency = arguments->frequency;
|
||||
while (1)
|
||||
{
|
||||
IODevice_write(&gpio->device, &high, 1);
|
||||
Led_on(arguments->led);
|
||||
|
||||
if (PCBA_getInstance()->pcba == PCBA_CathodeMCP)
|
||||
{
|
||||
indicator[0] = CathodeMCP_getInstance()->name[0];
|
||||
@@ -296,7 +301,7 @@ static void ledBlinkTask (void* parameters)
|
||||
}
|
||||
|
||||
vTaskDelay(configTICK_RATE_HZ / (frequency * 2));
|
||||
IODevice_write(&gpio->device, &low, 1);
|
||||
Led_off(arguments->led);
|
||||
indicator[0] = ' ';
|
||||
// Display_write(mainDisplay, indicator, 1, 20);
|
||||
vTaskDelay(configTICK_RATE_HZ / (frequency * 2));
|
||||
|
||||
Reference in New Issue
Block a user