Compare commits
10 Commits
f09eb6034c
...
a57abed989
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a57abed989 | ||
|
|
da411065e8 | ||
|
|
8fecd7ef99 | ||
|
|
7bb01bea8c | ||
|
|
59a7ab4634 | ||
|
|
1983bd24af | ||
|
|
713741793b | ||
|
|
ace5ab31bd | ||
|
|
2c2c6eb548 | ||
|
|
31c4aed7e8 |
|
After Width: | Height: | Size: 326 KiB |
|
After Width: | Height: | Size: 353 KiB |
|
After Width: | Height: | Size: 310 KiB |
|
After Width: | Height: | Size: 350 KiB |
|
After Width: | Height: | Size: 326 KiB |
|
After Width: | Height: | Size: 418 KiB |
|
After Width: | Height: | Size: 369 KiB |
|
After Width: | Height: | Size: 363 KiB |
|
After Width: | Height: | Size: 352 KiB |
|
After Width: | Height: | Size: 3.4 MiB |
|
After Width: | Height: | Size: 3.6 MiB |
|
After Width: | Height: | Size: 3.4 MiB |
|
After Width: | Height: | Size: 3.3 MiB |
|
After Width: | Height: | Size: 3.7 MiB |
|
After Width: | Height: | Size: 3.6 MiB |
@@ -80,15 +80,19 @@ ErrorStatus Led_construct(struct Gpio* onboardGreen, struct Gpio* onboardOrange,
|
||||
|
||||
self.leds[LED_ONBOARD_GREEN].ioDevice = &onboardGreen->device;
|
||||
self.leds[LED_ONBOARD_GREEN].initialized = true;
|
||||
Led_off(LED_ONBOARD_GREEN);
|
||||
|
||||
self.leds[LED_ONBOARD_ORANGE].ioDevice = &onboardOrange->device;
|
||||
self.leds[LED_ONBOARD_ORANGE].initialized = true;
|
||||
Led_off(LED_ONBOARD_ORANGE);
|
||||
|
||||
self.leds[LED_BICOLOR_GREEN].ioDevice = &bicolourGreen->device;
|
||||
self.leds[LED_BICOLOR_GREEN].initialized = true;
|
||||
Led_off(LED_BICOLOR_GREEN);
|
||||
|
||||
self.leds[LED_BICOLOR_RED].ioDevice = &bicolourRed->device;
|
||||
self.leds[LED_BICOLOR_RED].initialized = true;
|
||||
Led_off(LED_BICOLOR_RED);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -110,18 +114,18 @@ extern void Led_on(Led led)
|
||||
// IN case of the BICOLOUR LED, actually the GREEN and RED LEDs must be switched
|
||||
if (led == LED_BICOLOR_ORANGE)
|
||||
{
|
||||
IODevice_write(self.leds[LED_BICOLOR_GREEN].ioDevice, &bufferTrue, 1);
|
||||
IODevice_write(self.leds[LED_BICOLOR_RED].ioDevice, &bufferTrue, 1);
|
||||
IODevice_write(self.leds[LED_BICOLOR_GREEN].ioDevice, &bufferFalse, 1);
|
||||
IODevice_write(self.leds[LED_BICOLOR_RED].ioDevice, &bufferFalse, 1);
|
||||
}
|
||||
else if (led == LED_BICOLOR_GREEN)
|
||||
{
|
||||
IODevice_write(self.leds[LED_BICOLOR_GREEN].ioDevice, &bufferTrue, 1);
|
||||
IODevice_write(self.leds[LED_BICOLOR_RED].ioDevice, &bufferFalse, 1);
|
||||
IODevice_write(self.leds[LED_BICOLOR_GREEN].ioDevice, &bufferFalse, 1);
|
||||
IODevice_write(self.leds[LED_BICOLOR_RED].ioDevice, &bufferTrue, 1);
|
||||
}
|
||||
else if (led == LED_BICOLOR_RED)
|
||||
{
|
||||
IODevice_write(self.leds[LED_BICOLOR_GREEN].ioDevice, &bufferFalse, 1);
|
||||
IODevice_write(self.leds[LED_BICOLOR_RED].ioDevice, &bufferTrue, 1);
|
||||
IODevice_write(self.leds[LED_BICOLOR_GREEN].ioDevice, &bufferTrue, 1);
|
||||
IODevice_write(self.leds[LED_BICOLOR_RED].ioDevice, &bufferFalse, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -135,7 +139,9 @@ extern void Led_on(Led led)
|
||||
|
||||
extern void Led_off(Led led)
|
||||
{
|
||||
char bufferTrue = (char)true;
|
||||
char bufferFalse = (char)false;
|
||||
|
||||
if (self.initialized)
|
||||
{
|
||||
if (self.leds[led].initialized)
|
||||
@@ -143,8 +149,16 @@ extern void Led_off(Led led)
|
||||
// IN case of the BICOLOUR ORANGE LED, actually the GREEN and RED LEDs must be switched
|
||||
if (led == LED_BICOLOR_ORANGE)
|
||||
{
|
||||
IODevice_write(self.leds[LED_BICOLOR_GREEN].ioDevice, &bufferFalse, 1);
|
||||
IODevice_write(self.leds[LED_BICOLOR_RED].ioDevice, &bufferFalse, 1);
|
||||
IODevice_write(self.leds[LED_BICOLOR_GREEN].ioDevice, &bufferTrue, 1);
|
||||
IODevice_write(self.leds[LED_BICOLOR_RED].ioDevice, &bufferTrue, 1);
|
||||
}
|
||||
else if (led == LED_BICOLOR_GREEN)
|
||||
{
|
||||
IODevice_write(self.leds[LED_BICOLOR_GREEN].ioDevice, &bufferTrue, 1);
|
||||
}
|
||||
else if (led == LED_BICOLOR_RED)
|
||||
{
|
||||
IODevice_write(self.leds[LED_BICOLOR_RED].ioDevice, &bufferTrue, 1);
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#define MAINDISP_REFRESH_FEED_MS (1000)
|
||||
#define MAINDISP_REFRESH_PERIOD (5000)
|
||||
|
||||
#define MAINDISP_DEFAULT_BRIGHTNESS (5) // Set to MAX to avoid background light issue
|
||||
#define MAINDISP_DEFAULT_BRIGHTNESS (NHD0420_BRIGHTNESS_MAX) // Set to MAX to avoid background light issue
|
||||
#define MAINDISP_DEFAULT_CONTRAST (40)
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
|
||||
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 183 KiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 13 KiB |