Updates on the IODevice structure.
Display and Logger fully functional. Keypad task completed - yet to be tested git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@219 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -40,8 +40,11 @@
|
||||
#include "keypadMatrix.h"
|
||||
|
||||
#include "platform.h"
|
||||
#include "IODevice.h"
|
||||
#include "led.h"
|
||||
#include "uart.h"
|
||||
#include "spi.h"
|
||||
#include "spiDevice.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
@@ -137,8 +140,6 @@ static ErrorStatus systeminfoCommandHandler(void)
|
||||
|
||||
errorStatus &= Logger_logModuleInfo();
|
||||
vTaskDelay(100);
|
||||
errorStatus &= Keypad_logModuleInfo();
|
||||
vTaskDelay(100);
|
||||
OS_logTaskInfo(ledTaskHandle);
|
||||
vTaskDelay(100);
|
||||
OS_logTaskInfo(sysTaskHandle);
|
||||
@@ -152,9 +153,7 @@ static void initTask(void* parameters)
|
||||
|
||||
Logger_construct(&uart1->device);
|
||||
|
||||
Keypad_construct();
|
||||
|
||||
NHD0420_construct(spiDisplay);
|
||||
NHD0420_construct(&spiDisplay->device);
|
||||
|
||||
NHD0420_turnOffDisplay();
|
||||
vTaskDelay(1000);
|
||||
@@ -180,14 +179,16 @@ static void initTask(void* parameters)
|
||||
|
||||
static void ledBlinkTask (void* parameters)
|
||||
{
|
||||
char high = 1;
|
||||
char low = 0;
|
||||
struct LedTaskArguments* arguments = (struct LedTaskArguments*) parameters;
|
||||
struct Led* led = arguments->led;
|
||||
int frequency = arguments->frequency;
|
||||
while (1)
|
||||
{
|
||||
LED_turnOn(led);
|
||||
IODevice_write(&led->device, &high, 1);
|
||||
vTaskDelay(configTICK_RATE_HZ / (frequency * 2));
|
||||
LED_turnOff(led);
|
||||
IODevice_write(&led->device, &low, 1);
|
||||
vTaskDelay(configTICK_RATE_HZ / (frequency * 2));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user