[Horus] Refactoring continued

This commit is contained in:
Bertrand Songis
2015-10-22 20:04:54 +02:00
parent c8f77fceec
commit e18e6f9c41
51 changed files with 376 additions and 753 deletions
+4 -4
View File
@@ -157,7 +157,7 @@ void boardInit()
#if defined(REV9E)
if (!WAS_RESET_BY_WATCHDOG_OR_SOFTWARE()) {
lcd_clear();
lcdClear();
lcd_bmp(76, 2, bmp_lock, 0, 60);
lcdRefresh();
lcdRefreshWait();
@@ -169,7 +169,7 @@ void boardInit()
duration = get_tmr10ms() - start;
if (duration < PWR_PRESS_DURATION_MIN) {
unsigned index = duration / (PWR_PRESS_DURATION_MIN / 4);
lcd_clear();
lcdClear();
lcd_bmp(76, 2, bmp_startup, index*60, 60);
}
else if (duration >= PWR_PRESS_DURATION_MAX) {
@@ -193,7 +193,7 @@ void boardInit()
else {
backlightInit();
}
topLcdInit();
toplcdInit();
#else
backlightInit();
#endif
@@ -203,7 +203,7 @@ void boardOff()
{
BACKLIGHT_OFF();
#if defined(REV9E)
topLcdOff();
toplcdOff();
#endif
#if defined(REV9E)
+4 -4
View File
@@ -347,10 +347,10 @@ void lcdOff(void);
// Top LCD driver
#if defined(REV9E)
void topLcdInit(void);
void topLcdOff(void);
void topLcdRefreshStart(void);
void topLcdRefreshEnd(void);
void toplcdInit(void);
void toplcdOff(void);
void toplcdRefreshStart(void);
void toplcdRefreshEnd(void);
void setTopFirstTimer(int32_t value);
void setTopSecondTimer(uint32_t value);
void setTopRssi(uint32_t rssi);
@@ -402,7 +402,7 @@ int main()
lcdInit();
backlightInit();
lcd_clear();
lcdClear();
lcd_putsn(0, 0, (const char *)bootloaderVersion, 0); // trick to avoid bootloaderVersion to be optimized out ...
lcd_putsLeft(0, BOOTLOADER_TITLE);
lcd_invert_line(0);
@@ -427,7 +427,7 @@ int main()
Tenms = 0;
lcdRefreshWait();
lcd_clear();
lcdClear();
lcd_putsLeft(0, BOOTLOADER_TITLE);
lcd_invert_line(0);
@@ -686,7 +686,7 @@ int main()
if (state == ST_REBOOT) {
if (readKeys() == 0) {
lcd_clear();
lcdClear();
lcdRefresh();
lcdRefreshWait();
RCC->CSR |= RCC_CSR_RMVF; //clear the reset flags in RCC clock control & status register
+8 -8
View File
@@ -233,7 +233,7 @@ extern "C" void TIM8_BRK_TIM12_IRQHandler()
}
#endif
void topLcdInit()
void toplcdInit()
{
RCC_AHB1PeriphClockCmd(TOPLCD_RCC_AHB1Periph, ENABLE);
GPIO_InitTypeDef GPIO_InitStructure;
@@ -254,15 +254,15 @@ void topLcdInit()
ht1621SendCommand(1, 0x01);
ht1621SendCommand(1, 0x29);
topLcdRefreshStart();
topLcdRefreshEnd();
toplcdRefreshStart();
toplcdRefreshEnd();
}
void topLcdOff()
void toplcdOff()
{
BL_OFF();
topLcdRefreshStart();
topLcdRefreshEnd();
toplcdRefreshStart();
toplcdRefreshEnd();
}
void setTopFirstTimer(int32_t value)
@@ -419,13 +419,13 @@ void setTopSecondTimer(uint32_t value)
Ht1621Data1[3] |= 0x10; // "Operation Time"
}
void topLcdRefreshStart()
void toplcdRefreshStart()
{
memset(Ht1621Data1, 0, sizeof(Ht1621Data1));
memset(Ht1621Data2, 0, sizeof(Ht1621Data2));
}
void topLcdRefreshEnd()
void toplcdRefreshEnd()
{
ht1621WrAllData(0, Ht1621Data1);
ht1621WrAllData(1, Ht1621Data2);