*
*/
+/* includes */
+#include "betty.h"
+
+/*
+ * functions
+ */
+
+#define cc1100_init spi1_init(8,SPI_MASTER,8)
+
+/*
+ * main function
+ */
+
int main() {
+ char buf[]="betty - live from flash at 0x80000000! ;)\r\n";
+ t_button button;
+
+ /* system init */
+ pll_init();
+
+ /* uart init */
+ uart0_init();
+
+ /* display init */
+ bl_init();
+
+ /* button init */
+ button_init(&button);
+ button_set_retries(&button,100);
+
+ /*
+ * start it ...
+ */
+
+ pause(0xffffff);
+ bl_toggle();
+
+ while(1) {
+ pause(0x0fffff);
+ /* button test! */
+ if(button_get_event(&button)) {
+ uart0_send_string(buf);
+ if(button.key[0]==BUTTON_POWER)
+ bl_toggle();
+ }
+ }
return 0;
}