summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/app
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/eos/app')
-rw-r--r--fw/fe310/eos/app/root.c12
-rw-r--r--fw/fe310/eos/app/root.h3
2 files changed, 11 insertions, 4 deletions
diff --git a/fw/fe310/eos/app/root.c b/fw/fe310/eos/app/root.c
index a86b291..43bab11 100644
--- a/fw/fe310/eos/app/root.c
+++ b/fw/fe310/eos/app/root.c
@@ -46,11 +46,11 @@ static uint8_t kbd_draw(EVEView *v, uint8_t tag0) {
return tag0;
}
-void app_root_init(eve_view_constructor_t home_page) {
+void app_screen_init(eve_view_constructor_t home_page) {
EVERect g;
_app_font_default = &font;
- eos_spi_dev_start(EOS_DEV_DISP);
+ eve_spi_start();
eve_brightness(0x40);
@@ -86,11 +86,17 @@ void app_root_init(eve_view_constructor_t home_page) {
eve_screen_hide_kbd(&screen);
eve_screen_draw(&screen);
- eos_spi_dev_stop();
+ eve_spi_stop();
eos_net_acquire_for_evt(EOS_EVT_UI | EVE_ETYPE_INTR, 1);
}
+void app_screen_refresh(void) {
+ eve_spi_start();
+ eve_screen_draw(app_screen());
+ eve_spi_stop();
+}
+
static void widgets_destroy(EVEWidget *widget, uint16_t widget_size) {
int i;
diff --git a/fw/fe310/eos/app/root.h b/fw/fe310/eos/app/root.h
index 2b6fc63..69624e7 100644
--- a/fw/fe310/eos/app/root.h
+++ b/fw/fe310/eos/app/root.h
@@ -22,7 +22,8 @@ typedef struct APPWidgetSpec {
} APPWidgetSpec;
EVEScreen *app_screen(void);
-void app_root_init(eve_view_constructor_t home_page);
+void app_screen_init(eve_view_constructor_t home_page);
+void app_screen_refresh(void);
EVEForm *app_form_create(EVEWindow *window, EVEViewStack *stack, APPWidgetSpec spec[], uint16_t spec_size, eve_form_action_t action, eve_form_destructor_t destructor);
void app_form_destroy(EVEForm *form);