1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/projects/hi_earth/main.c
Oliver Hahm ec6a794143 [cc110x_ng]
* fuxed transceiver driver for chronos
* some more stuff
2010-12-10 18:00:31 +01:00

62 lines
1.3 KiB
C

//******************************************************************************
// eZ430 chronos hello world
// Description: initializes lcd module and shows the string 'hi earth' on the
// lcd display becuase 'hello world' is too long
// Author: Felix Genicio
//******************************************************************************
#include <cc430x613x.h>
#include <string.h>
#include <display.h>
#include <hwtimer.h>
void display1(void);
void display2(void);
int main(void)
{
lcd_init();
clear_display_all();
uint8_t i = 0;
uint16_t j;
while(1) {
if (i) {
i = 0;
display1();
}
else {
i = 1;
display2();
}
for (j = 1; j < 10; j++) {
hwtimer_wait(3333);
}
display_symbol(5, SEG_ON);
/*
for (j = 1; j != 0; j++) {
if (i) {
display_symbol(LCD_ICON_BEEPER1, SEG_ON);
}
else {
display_symbol(5, SEG_OFF);
}
}
*/
}
}
void display1(void) {
display_chars(LCD_SEG_L1_3_0, "HI", SEG_ON);
display_chars(LCD_SEG_L2_5_0, " EARTH", SEG_OFF);
}
void display2(void) {
display_chars(LCD_SEG_L1_3_0, "HI", SEG_OFF);
display_chars(LCD_SEG_L2_5_0, (char*) itoa(TA0R, 6, 0), SEG_ON);
// display_chars(LCD_SEG_L2_5_0, (uint8_t*) " EARTH", SEG_ON);
}