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:
mmi
2017-12-01 13:48:28 +00:00
parent 1415b5c6f2
commit e3b613c976
9 changed files with 369 additions and 73 deletions

View File

@@ -42,7 +42,7 @@
#define MAINDISP_REFRESH_FEED_MS (1000)
#define MAINDISP_REFRESH_PERIOD (5000)
#define MAINDISP_DEFAULT_BRIGHTNESS (5)
#define MAINDISP_DEFAULT_BRIGHTNESS (8) // Set to MAX to avoid background light issue
#define MAINDISP_DEFAULT_CONTRAST (40)
// -----------------------------------------------------------------------------
// Type definitions
@@ -61,6 +61,7 @@ struct Display* const mainDisplay = &_mainDisplay;
// Function declarations
// -----------------------------------------------------------------------------
static ErrorStatus Displays_initMainDisplay(void);
static ErrorStatus Displays_mainDisplayObserverFromISR(const void* const data);
// -----------------------------------------------------------------------------
@@ -71,6 +72,26 @@ ErrorStatus Displays_construct(void)
{
ErrorStatus returnValue = SUCCESS;
if (returnValue == SUCCESS)
{
returnValue = Displays_initMainDisplay();
}
return returnValue;
}
extern void Displays_destruct(void)
{
Observable_deleteObserver(RTC_getObservable(rtc), Displays_mainDisplayObserverFromISR);
Display_destruct(mainDisplay);
}
static ErrorStatus Displays_initMainDisplay(void)
{
ErrorStatus returnValue = SUCCESS;
if (returnValue == SUCCESS)
{
returnValue = Display_construct(mainDisplay, &nhd0420->displayDevice, HSB_MAINDISP_TASK_PRIORITY, HSB_MAINDISP_TASK_STACKSIZE, MAINDISP_MAX_CHAR_CHUNK, MAINDISP_REFRESH_FEED_MS, MAINDISP_REFRESH_PERIOD);
@@ -105,13 +126,6 @@ ErrorStatus Displays_construct(void)
}
extern void Displays_destruct(void)
{
Observable_deleteObserver(RTC_getObservable(rtc), Displays_mainDisplayObserverFromISR);
Display_destruct(mainDisplay);
}
static ErrorStatus Displays_mainDisplayObserverFromISR(const void* const data)
{
Display_feedRefreshCounterFromISR(mainDisplay);