improvements to apps and drivers
This commit is contained in:
@@ -29,14 +29,11 @@ static void prv_on_create(nb_platform_t _Nonnull* platform, lv_obj_t _Nonnull* l
|
||||
lvgl_port_unlock();
|
||||
}
|
||||
|
||||
nb_app_config_t hello_world_app_config() {
|
||||
nb_app_config_t config = {
|
||||
.id = "helloworld",
|
||||
.name = "Hello World",
|
||||
.type = USER,
|
||||
.on_create = &prv_on_create,
|
||||
.on_update = NULL,
|
||||
.on_destroy = NULL
|
||||
};
|
||||
return config;
|
||||
}
|
||||
nb_app_t hello_world_app = {
|
||||
.id = "helloworld",
|
||||
.name = "Hello World",
|
||||
.type = USER,
|
||||
.on_create = &prv_on_create,
|
||||
.on_update = NULL,
|
||||
.on_destroy = NULL
|
||||
};
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
#include "nb_app.h"
|
||||
|
||||
nb_app_config_t hello_world_app_config();
|
||||
extern nb_app_t hello_world_app;
|
||||
|
||||
#endif //NANOBAKE_HELLO_WORLD_H
|
||||
+1
-1
@@ -12,7 +12,7 @@ void app_main(void) {
|
||||
.display_driver = &board_2432s024_create_display_driver,
|
||||
.touch_driver = &board_2432s024_create_touch_driver,
|
||||
.apps = {
|
||||
&hello_world_app_config
|
||||
&hello_world_app
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user