projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SEC: fix a useless call in benchmarks.
[bertos.git]
/
boards
/
ek-lm3s1968
/
templates
/
empty
/
main.c
diff --git
a/boards/ek-lm3s1968/templates/empty/main.c
b/boards/ek-lm3s1968/templates/empty/main.c
index d79b9880ba04fec374770f68627567d2d4eb901a..e4895270e651c312cc1797b8c946eab91886c8a5 100644
(file)
--- a/
boards/ek-lm3s1968/templates/empty/main.c
+++ b/
boards/ek-lm3s1968/templates/empty/main.c
@@
-38,42
+38,59
@@
* supported board and proposes an empty main.
*/
* supported board and proposes an empty main.
*/
+#include "hw/hw_led.h"
+
#include <cfg/debug.h>
#include <cfg/debug.h>
+
#include <cpu/irq.h>
#include <cpu/irq.h>
-#include <cpu/power.h>
-#include <hw/hw_led.h>
+
#include <drv/timer.h>
#include <drv/ser.h>
#include <drv/timer.h>
#include <drv/ser.h>
-#include <kern/proc.h>
-#include <drv/ser.h>
#include <drv/lcd_rit128x96.h>
#include <drv/kbd.h>
#include <drv/lcd_rit128x96.h>
#include <drv/kbd.h>
+#include <drv/flash.h>
-static uint8_t raster[RAST_SIZE(LCD_WIDTH, LCD_HEIGHT)];
+/* Bitmap to display on the OLED display */
static Bitmap lcd_bitmap;
static Bitmap lcd_bitmap;
-
+/* Raster associated to the Bitmap image */
+static uint8_t raster[RAST_SIZE(LCD_WIDTH, LCD_HEIGHT)];
+/* Internal flash memory descriptor */
+static Flash flash;
+/* UART port descriptor */
static Serial out;
static void init(void)
{
static Serial out;
static void init(void)
{
+ /* Enable all the interrupts */
IRQ_ENABLE;
IRQ_ENABLE;
+ /* Initialize debugging module (allow kprintf(), etc.) */
kdbg_init();
kdbg_init();
+ /* Initialize system timer */
timer_init();
timer_init();
- proc_init();
+ /* Initialize UART1 */
+ ser_init(&out, SER_UART1);
+ /* Configure UART0 to work at 115.200 bps */
+ ser_setbaudrate(&out, 115200);
+ /* Initialize LED driver */
LED_INIT();
LED_INIT();
+ /* Initialize the OLED display (RIT128x96) */
rit128x96_init();
rit128x96_init();
+ /* Draw an empty Bitmap on the screen */
gfx_bitmapInit(&lcd_bitmap, raster, LCD_WIDTH, LCD_HEIGHT);
gfx_bitmapInit(&lcd_bitmap, raster, LCD_WIDTH, LCD_HEIGHT);
+ /* Refresh the display */
rit128x96_blitBitmap(&lcd_bitmap);
rit128x96_blitBitmap(&lcd_bitmap);
+ /* Initialize the keypad driver */
kbd_init();
kbd_init();
-
- ser_init(&out, SER_UART0);
- ser_setbaudrate(&out, 115200);
+ /* Initialize the internal flash memory */
+ flash_init(&flash, 0);
}
int main(void)
{
init();
}
int main(void)
{
init();
+
+ /* Put your code here... */
while (1)
{
}
while (1)
{
}