Fix ar9x compile/boot (#7102)

* view_main: fix compile on atsam

* AR9X: fix broken/missing boardInit() since 0ec34fd72c, readd rtcInit to boardInit (on AR9X)
This commit is contained in:
reichi
2019-11-20 11:56:22 +01:00
committed by Bertrand Songis
parent eba05402a1
commit 0ebf9dbb1e
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -186,7 +186,7 @@ void drawTimerWithMode(coord_t x, coord_t y, uint8_t index)
const uint8_t negative = (timerState.val<0 ? BLINK | INVERS : 0);
LcdFlags att = RIGHT | DBLSIZE;
if (timerState.val < 60 * 60) { // display MM:SS
div_t qr = div(abs(timerState.val), 60);
div_t qr = div((int)abs(timerState.val), 60);
lcdDrawNumber(x - 5, y, qr.rem, att | LEADING0 | negative, 2);
lcdDrawText(lcdLastLeftPos, y, ":", att|BLINK | negative);
lcdDrawNumber(lcdLastLeftPos, y, qr.quot, att | negative);
@@ -194,7 +194,7 @@ void drawTimerWithMode(coord_t x, coord_t y, uint8_t index)
lcdDrawText(lcdLastLeftPos, y, "-", att | negative);
}
else if (timerState.val < (99 * 60 * 60) + (59 * 60)) { // display HHhMM
div_t qr = div(abs(timerState.val) / 60, 60);
div_t qr = div((int)(abs(timerState.val) / 60), 60);
lcdDrawNumber(x - 5, y, qr.rem, att | LEADING0, 2);
lcdDrawText(lcdLastLeftPos, y, "h", att);
lcdDrawNumber(lcdLastLeftPos, y, qr.quot, att);
+5 -5
View File
@@ -330,6 +330,7 @@ void i2cInit()
TWI0->TWI_MMR = 0x002F0000 ; // Device 5E (>>1) and master is writing
NVIC_EnableIRQ(TWI0_IRQn) ;
}
#endif
void boardInit()
{
@@ -388,12 +389,11 @@ void boardInit()
lcdInit();
init_SDcard();
}
#else
void boardInit()
{
}
#if defined(PCBAR9X)
rtcInit();
#endif
}
uint8_t temperature = 0; // Raw temp reading
uint8_t maxTemperature = 0 ; // Raw temp reading