#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;
- y %= 96;
+ if (x > 95)
+ x = 95;
+ if (y > 95)
+ y = 95;
mw_lcd_draw_pixel(x, y, color ? LCD_BLACK : LCD_WHITE);
}
rtc->day = RTCDAY;
rtc->month = RTCMON;
rtc->year = RTCYEAR;
+ rtc->wday = RTCDOW;
}
void hal_set_rtc(clock_state *rtc, boolean set_sec)
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();
+}
+
+uint16_t hal_amblight_get_val(void)
+{
+ return mw_get_amblight_adc_val();
+}
+