projects
/
my-code
/
arm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
code clean up!
[my-code/arm.git]
/
betty
/
betty.c
diff --git
a/betty/betty.c
b/betty/betty.c
index
f2ce2e5
..
31bc5a2
100644
(file)
--- a/
betty/betty.c
+++ b/
betty/betty.c
@@
-5,9
+5,54
@@
*
*/
*
*/
+/* includes */
+#include "betty.h"
+
+/*
+ * functions
+ */
+
+#define cc1100_init spi1_init(8,SPI_MASTER,8)
+
+/*
+ * main function
+ */
+
int main() {
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;
}
return 0;
}