]> git.karo-electronics.de Git - oswald.git/blobdiff - metawatch/oswald_hal.c
Make accelerometer work, interrup driven tilt change mode
[oswald.git] / metawatch / oswald_hal.c
index d731b51fa75f24f38ab6717ddcc297f1eecfbc1f..528f1a6d230b5a1e655dc33ab494c09fed92d498 100644 (file)
 #include "mw_bt.h"
 #include "bt_hci.h"
 #include "bt_l2cap.h"
+#include "bluetooth_init_cc256x.h"
+#include "mw_acc.h"
 
 #include "oswald.h"
 #include "oswald_hal.h"
 
 #include "calendar.h"
 
+
+const char *hal_get_version_string(void)
+{
+       return MW_MAIN_VERSION;
+}
+
+const char *hal_get_buildno_string(void)
+{
+       return BUILDNO;
+}
+
+const char *hal_get_radio_version_string(void)
+{
+       return cc256x_version;
+}
+
 void hal_lcd_set_pixel(uint8_t x, uint8_t y, uint8_t color)
 {
        x %= 96;
@@ -232,3 +250,17 @@ void hal_bluetooth_send_data(const void *mdat, uint16_t mlen)
        bt_l2cap_send_channel(0x40, mdat, mlen);
 }
 
+/*
+ * Control the accelerometer
+ */
+void hal_accelerometer_enable(void)
+{
+       mw_acc_enable();
+}
+
+void hal_accelerometer_disable(void)
+{
+       mw_acc_disable();
+}
+
+