mirror of
https://github.com/RfidResearchGroup/mayhem-firmware.git
synced 2026-05-12 11:27:21 -07:00
Standalone imp (#2791)
* Moved ui elements to common folder in standalone, and add screen parameters to the api v4 * pass it as a pointer, so if standalone app supports it can change
This commit is contained in:
@@ -233,6 +233,9 @@ standalone_application_api_t api = {
|
||||
.draw_pixels = &ext_draw_pixels,
|
||||
.draw_pixel = &ext_draw_pixel,
|
||||
.exit_app = &exit_app,
|
||||
// version 4
|
||||
.screen_height = &screen_height,
|
||||
.screen_width = &screen_width,
|
||||
};
|
||||
|
||||
StandaloneView::StandaloneView(NavigationView& nav, uint8_t* app_image)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "ui.hpp"
|
||||
#include "file.hpp"
|
||||
|
||||
#define CURRENT_STANDALONE_APPLICATION_API_VERSION 3
|
||||
#define CURRENT_STANDALONE_APPLICATION_API_VERSION 4
|
||||
|
||||
struct standalone_application_api_t {
|
||||
// Version 1
|
||||
@@ -105,6 +105,11 @@ struct standalone_application_api_t {
|
||||
void (*draw_pixels)(const ui::Rect r, const ui::Color* const colors, const size_t count);
|
||||
void (*draw_pixel)(const ui::Point p, const ui::Color color);
|
||||
void (*exit_app)();
|
||||
|
||||
// Version 4
|
||||
uint16_t* screen_height;
|
||||
uint16_t* screen_width;
|
||||
|
||||
// TODO: add baseband access functions
|
||||
|
||||
// HOW TO extend this interface:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user