Switch to CMake - Taranis bootloader added. Tests done.

This commit is contained in:
Bertrand Songis
2015-12-23 18:39:02 +01:00
parent 356faefb6d
commit d02d0f26db
14 changed files with 215 additions and 120 deletions
+7 -17
View File
@@ -27,16 +27,6 @@
bool lcdInitFinished = false;
void lcdInitFinish();
/*
delaysInit() must be called before the first call to this function!
*/
static void Delay(uint32_t ms)
{
while(ms--) {
delay_01us(10000);
}
}
#if defined(REVPLUS)
// New hardware SPI driver for LCD
@@ -71,7 +61,7 @@ void initLcdSpi()
static void LCD_Init()
{
WriteCommand(0x2F); //Internal pump control
Delay(20);
delay(20);
WriteCommand(0x24); //Temperature compensation
WriteCommand(0xE9); //set bias=1/10
WriteCommand(0x81); //Set Vop
@@ -106,7 +96,7 @@ static void LCD_Init()
static void LCD_Init()
{
AspiCmd(0x2B); //Panel loading set ,Internal VLCD.
Delay(20);
delay(20);
AspiCmd(0x25); //Temperature compensation curve definition: 0x25 = -0.05%/oC
AspiCmd(0xEA); //set bias=1/10 :Command table NO.27
AspiCmd(0x81); //Set Vop
@@ -349,7 +339,7 @@ void lcdOff()
to re-init LCD without any delay
*/
AspiCmd(0xAE); //LCD sleep
Delay(3); //wait for caps to drain
delay(3); //wait for caps to drain
}
/*
@@ -357,7 +347,7 @@ void lcdOff()
soon as possible after the reset because LCD takes a lot of
time to properly power-on.
Make sure that Delay() is functional before calling this function!
Make sure that delay() is functional before calling this function!
*/
void lcdInit()
{
@@ -367,7 +357,7 @@ void lcdInit()
//reset LCD module
LCD_RST_LOW();
Delay(1); // only 3 us needed according to data-sheet, we use 1 ms
delay(1); // only 3 us needed according to data-sheet, we use 1 ms
LCD_RST_HIGH();
}
@@ -404,13 +394,13 @@ void lcdInitFinish()
#if !defined(BOOT)
while(g_tmr10ms < (RESET_WAIT_DELAY_MS/10)) {}; //wait measured from the power-on
#else
Delay(RESET_WAIT_DELAY_MS);
delay(RESET_WAIT_DELAY_MS);
#endif
}
LCD_Init();
AspiCmd(0xAF); //dc2=1, IC into exit SLEEP MODE, dc3=1 gray=ON, dc4=1 Green Enhanc mode disabled
Delay(20); //needed for internal DC-DC converter startup
delay(20); //needed for internal DC-DC converter startup
}
void lcdSetRefVolt(uint8_t val)