static oswald_ui *ui_g;
-void hal_lcd_set_pixel(gint x, gint y, gboolean state)
+void hal_lcd_set_pixel(gint x, gint y, uint8_t state)
{
gint ix, iy;
ix = x*2;
iy = y*2;
+ // we double all pixel to get a bigger picture
gdk_draw_point(GDK_DRAWABLE(ui_g->pixmap), state ? ui_g->darea->style->black_gc : ui_g->darea->style->white_gc, ix, iy);
gdk_draw_point(GDK_DRAWABLE(ui_g->pixmap), state ? ui_g->darea->style->black_gc : ui_g->darea->style->white_gc, ix+1, iy);
gdk_draw_point(GDK_DRAWABLE(ui_g->pixmap), state ? ui_g->darea->style->black_gc : ui_g->darea->style->white_gc, ix, iy+1);
void hal_accelerometer_disable(void)
{
- g_printerr("accel enable\n");
+ g_printerr("accel disable\n");
gtk_widget_set_sensitive(ui_g->x_sc, FALSE);
gtk_widget_set_sensitive(ui_g->y_sc, FALSE);
gtk_widget_set_sensitive(ui_g->z_sc, FALSE);
rtc->minute = mtime.tm_min;
rtc->second = mtime.tm_sec;
rtc->day = mtime.tm_mday;
+ rtc->wday = mtime.tm_wday;
rtc->month = (mtime.tm_mon + 1);
rtc->year = (mtime.tm_year + 1900);
+
}
void hal_set_rtc(const clock_state *rtc, boolean set_set)
void hal_get_power_state(power_state *pwr)
{
+ pwr->source = POWER_SOURCE_EXTERNAL;
+ pwr->charge_state = POWER_CHARGER_CHARGING;
+ pwr->percent = 50;
+ pwr->level = 3242; // mV
}
static boolean BacklightState = FALSE;
return BacklightState;
}
+static boolean VibrationState = FALSE;
/* sets the vibration motor on/off, on=TRUE, off=FALSE */
void hal_vibration_set_state(boolean state)
{
+ g_print("turn vibration %s\n", state ? "on" : "off");
+ VibrationState = state;
}
boolean hal_vibration_get_state(void)
{
- return FALSE;
+ return VibrationState;
}
+uint16_t hal_amblight_get_val(void)
+{
+ return 42;
+}
+
int main(int argc , char ** argv)
{