summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/app
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2021-02-28 18:38:37 +0100
committerUros Majstorovic <majstor@majstor.org>2021-02-28 18:38:37 +0100
commit6a4c8a1f11f6a7bd57b0fd618f455bcdecbfe538 (patch)
tree6d16dbc38b3bac0e91d39f3e86bb6810761ddb84 /fw/fe310/eos/app
parent468e81e6da66f6dfec3a4857dc6e2f370ab180f1 (diff)
net send will do selected spi dev pause/resume if more is set and netowk is not active
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);