Commit 009d1cae authored by Matthieu Cattin's avatar Matthieu Cattin

sw: Make altimeter test work with dma lcd.

parent 3016fb9b
......@@ -133,7 +133,7 @@ INCLUDEPATHS += \
-I../common/Device/EnergyMicro/EFM32GG/Include \
-I../common/emlib/inc \
-I../common/drivers \
-I../common/glib \
-I../common/gfx \
-I../common
####################################################################
......@@ -142,9 +142,12 @@ INCLUDEPATHS += \
C_SRC += \
../common/Device/EnergyMicro/EFM32GG/Source/system_efm32gg.c \
../common/drivers/dmactrl.c \
../common/drivers/lcd.c \
../common/drivers/lcd_dma.c \
../common/emlib/src/em_assert.c \
../common/emlib/src/em_cmu.c \
../common/emlib/src/em_dma.c \
../common/emlib/src/em_emu.c \
../common/emlib/src/em_gpio.c \
../common/emlib/src/em_i2c.c \
......@@ -152,17 +155,18 @@ C_SRC += \
../common/emlib/src/em_system.c \
../common/emlib/src/em_rtc.c \
../common/emlib/src/em_usart.c \
../common/emlib/src/em_timer.c \
../common/gfx/graphics.c \
../common/gfx/font_helv11.c \
../common/gfx/font_helv17.c \
../common/gfx/font_helv17b.c \
../common/gfx/font_xm4x5.c \
../common/gfx/font_xm4x6.c \
../common/udelay.c \
../common/delay.c \
../common/drivers/i2cdrv.c \
../common/drivers/altimeter.c \
main.c
main.c \
#../common/udelay.c \
#../common/drivers/display.c \
#../common/drivers/displayls013b7dh03.c \
#../common/drivers/displaypalemlib.c \
......
......@@ -28,6 +28,7 @@
#include <math.h>
#include <delay.h>
#include <i2cdrv.h>
#include <em_chip.h>
#include <em_device.h>
#include <em_cmu.h>
#include <em_gpio.h>
......@@ -54,6 +55,12 @@ int main(void)
/* Setup SysTick Timer for 1 msec interrupts */
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_GPIO, true);
......@@ -62,6 +69,7 @@ int main(void)
GPIO_PinModeSet(gpioPortE, 12, gpioModePushPull, 0);
lcd_init();
lcd_clear();
I2CDRV_Init(&i2cInit);
......@@ -86,9 +94,9 @@ int main(void)
//sprintf(str, "err: 0x%02x", err);
//text(&font_helv11, 5, 50, str);
lcd_update();
//Delay(1000);
box(5, 10, 128, 50, 0);
//lcd_clear();
Delay(1000);
//box(5, 10, 128, 50, 0);
lcd_clear();
}
......
......@@ -38,6 +38,8 @@
extern xSemaphoreHandle lcd_sem;
#endif /* FREERTOS */
//#define LCD_NODMA
// Dimensions
#define LCD_HEIGHT 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