mk450: x and y axis basic implementation
[cortex-from-scratch] / rtc.c
diff --git a/rtc.c b/rtc.c
index 7765046..5490b22 100644 (file)
--- a/rtc.c
+++ b/rtc.c
@@ -27,6 +27,7 @@
 
 #include <drivers/led.h>
 #include <drivers/tm1637.h>
+#include <drivers/mk450_joystick.h>
 
 
 /* This handler is invoked each clock tick. I've included two examples 
@@ -58,9 +59,12 @@ void * rtc_handler() {
        } */
 
        // Simple LED blink 
-       uint32_t curr = *RTC_CNTL;
-       int even = *RTC_CNTL % 2;
-       (!even) ? led_off() : led_on();
+       //uint32_t curr = *RTC_CNTL;
+       //int even = *RTC_CNTL % 2;
+       //(!even) ? led_off() : led_on();
+       
+       printf("X: %x\n", mk450_getx());
+       printf("Y: %x\n", mk450_gety());
 
        rclrbit(RTC_CRL, 0); /* clear interrupt flag */
 }