Commit bcc22197 authored by Matthieu Cattin's avatar Matthieu Cattin Committed by Projects

sw: Make altimeter test work with dma lcd.

parent 1cd88c24
...@@ -133,7 +133,7 @@ INCLUDEPATHS += \ ...@@ -133,7 +133,7 @@ INCLUDEPATHS += \
-I../common/Device/EnergyMicro/EFM32GG/Include \ -I../common/Device/EnergyMicro/EFM32GG/Include \
-I../common/emlib/inc \ -I../common/emlib/inc \
-I../common/drivers \ -I../common/drivers \
-I../common/glib \ -I../common/gfx \
-I../common -I../common
#################################################################### ####################################################################
...@@ -142,9 +142,12 @@ INCLUDEPATHS += \ ...@@ -142,9 +142,12 @@ INCLUDEPATHS += \
C_SRC += \ C_SRC += \
../common/Device/EnergyMicro/EFM32GG/Source/system_efm32gg.c \ ../common/Device/EnergyMicro/EFM32GG/Source/system_efm32gg.c \
../common/drivers/dmactrl.c \
../common/drivers/lcd.c \ ../common/drivers/lcd.c \
../common/drivers/lcd_dma.c \
../common/emlib/src/em_assert.c \ ../common/emlib/src/em_assert.c \
../common/emlib/src/em_cmu.c \ ../common/emlib/src/em_cmu.c \
../common/emlib/src/em_dma.c \
../common/emlib/src/em_emu.c \ ../common/emlib/src/em_emu.c \
../common/emlib/src/em_gpio.c \ ../common/emlib/src/em_gpio.c \
../common/emlib/src/em_i2c.c \ ../common/emlib/src/em_i2c.c \
...@@ -152,17 +155,18 @@ C_SRC += \ ...@@ -152,17 +155,18 @@ C_SRC += \
../common/emlib/src/em_system.c \ ../common/emlib/src/em_system.c \
../common/emlib/src/em_rtc.c \ ../common/emlib/src/em_rtc.c \
../common/emlib/src/em_usart.c \ ../common/emlib/src/em_usart.c \
../common/emlib/src/em_timer.c \
../common/gfx/graphics.c \ ../common/gfx/graphics.c \
../common/gfx/font_helv11.c \ ../common/gfx/font_helv11.c \
../common/gfx/font_helv17.c \ ../common/gfx/font_helv17.c \
../common/gfx/font_helv17b.c \ ../common/gfx/font_helv17b.c \
../common/gfx/font_xm4x5.c \ ../common/gfx/font_xm4x5.c \
../common/gfx/font_xm4x6.c \ ../common/gfx/font_xm4x6.c \
../common/udelay.c \
../common/delay.c \ ../common/delay.c \
../common/drivers/i2cdrv.c \ ../common/drivers/i2cdrv.c \
../common/drivers/altimeter.c \ ../common/drivers/altimeter.c \
main.c main.c \
#../common/udelay.c \
#../common/drivers/display.c \ #../common/drivers/display.c \
#../common/drivers/displayls013b7dh03.c \ #../common/drivers/displayls013b7dh03.c \
#../common/drivers/displaypalemlib.c \ #../common/drivers/displaypalemlib.c \
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <math.h> #include <math.h>
#include <delay.h> #include <delay.h>
#include <i2cdrv.h> #include <i2cdrv.h>
#include <em_chip.h>
#include <em_device.h> #include <em_device.h>
#include <em_cmu.h> #include <em_cmu.h>
#include <em_gpio.h> #include <em_gpio.h>
...@@ -166,6 +167,12 @@ int main(void) ...@@ -166,6 +167,12 @@ int main(void)
/* Setup SysTick Timer for 1 msec interrupts */ /* Setup SysTick Timer for 1 msec interrupts */
if (SysTick_Config(CMU_ClockFreqGet(cmuClock_CORE) / 1000)) while (1); if (SysTick_Config(CMU_ClockFreqGet(cmuClock_CORE) / 1000)) while (1);
// Just in case something goes wrong
Delay(200);
// Chip errata
CHIP_Init();
CMU_ClockEnable(cmuClock_HFPER, true); CMU_ClockEnable(cmuClock_HFPER, true);
CMU_ClockEnable(cmuClock_GPIO, true); CMU_ClockEnable(cmuClock_GPIO, true);
...@@ -174,6 +181,7 @@ int main(void) ...@@ -174,6 +181,7 @@ int main(void)
GPIO_PinModeSet(gpioPortE, 12, gpioModePushPull, 0); GPIO_PinModeSet(gpioPortE, 12, gpioModePushPull, 0);
lcd_init(); lcd_init();
lcd_clear();
I2CDRV_Init(&i2cInit); I2CDRV_Init(&i2cInit);
...@@ -239,10 +247,9 @@ int main(void) ...@@ -239,10 +247,9 @@ int main(void)
//sprintf(str, "err: 0x%02x", err); //sprintf(str, "err: 0x%02x", err);
//text(&font_helv11, 5, 50, str); //text(&font_helv11, 5, 50, str);
lcd_update(); lcd_update();
//Delay(2000); Delay(1000);
//box(5, 10, 128, 50, 0); //box(5, 10, 128, 50, 0);
lcd_clear(); lcd_clear();
} }
......
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
extern xSemaphoreHandle lcd_sem; extern xSemaphoreHandle lcd_sem;
#endif /* FREERTOS */ #endif /* FREERTOS */
//#define LCD_NODMA
// Dimensions // Dimensions
#define LCD_HEIGHT 128 #define LCD_HEIGHT 128
#define LCD_WIDTH 128 #define LCD_WIDTH 128
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment