From 79a913f442962c3a32cd3d84d8449070e1a7594f Mon Sep 17 00:00:00 2001 From: ZennDev1337 Date: Mon, 2 Oct 2023 11:18:17 +0200 Subject: [PATCH] added begin() drawBitmap() display() exports for testing purposes --- arduboy-rust/Wrapper-Project/platformio.ini | 1 + .../src/library/arduboy/arduboyfx_export.h | 29 +++++++++++++++++++ arduboy-rust/Wrapper-Project/src/main.h | 6 ++++ import_config.h | 1 + 4 files changed, 37 insertions(+) create mode 100644 arduboy-rust/Wrapper-Project/src/library/arduboy/arduboyfx_export.h diff --git a/arduboy-rust/Wrapper-Project/platformio.ini b/arduboy-rust/Wrapper-Project/platformio.ini index 3917faf..d33c3d6 100644 --- a/arduboy-rust/Wrapper-Project/platformio.ini +++ b/arduboy-rust/Wrapper-Project/platformio.ini @@ -22,3 +22,4 @@ lib_deps = mlxxxp/Arduboy2@^6.0.0 ArduboyTones@^1.0.3 https://github.com/igvina/ArdVoice + https://github.com/MrBlinky/ArduboyFX diff --git a/arduboy-rust/Wrapper-Project/src/library/arduboy/arduboyfx_export.h b/arduboy-rust/Wrapper-Project/src/library/arduboy/arduboyfx_export.h new file mode 100644 index 0000000..9bae830 --- /dev/null +++ b/arduboy-rust/Wrapper-Project/src/library/arduboy/arduboyfx_export.h @@ -0,0 +1,29 @@ +#pragma once + +extern "C" +{ + void arduboyfx_begin(void) + { + FX::begin(); + } + void arduboyfx_begin_data(uint16_t datapage) + { + FX::begin(datapage); + } + void arduboyfx_begin_data_save(uint16_t datapage,uint16_t savepage ) + { + FX::begin(datapage,savepage); + } + void arduboyfx_display() + { + FX::display(); + } + void arduboyfx_display_clear() + { + FX::display(true); + } + void arduboyfx_draw_bitmap(int16_t x,int16_t y,uint24_t address,uint8_t frame,uint8_t mode ) + { + FX::drawBitmap(x,y,address,frame,mode); + } +} \ No newline at end of file diff --git a/arduboy-rust/Wrapper-Project/src/main.h b/arduboy-rust/Wrapper-Project/src/main.h index e3f92b8..a574aba 100644 --- a/arduboy-rust/Wrapper-Project/src/main.h +++ b/arduboy-rust/Wrapper-Project/src/main.h @@ -13,6 +13,12 @@ Arduboy2 arduboy; #include #include "./library/arduboy/arduboy_tones_export.h" #endif + +#if defined(ArduboyFX_Library) +#include +#include "./library/arduboy/arduboyfx_export.h" +#endif + #if defined(ArdVoice_Library) #include ArdVoice ardvoice; diff --git a/import_config.h b/import_config.h index 2ccd03d..aedc54b 100644 --- a/import_config.h +++ b/import_config.h @@ -17,6 +17,7 @@ #define Arduboy2_Library ; // #define ArduboyTones_Library ; + #define ArduboyFX_Library ; // #define ArdVoice_Library ; #define EEPROM_Library ; #define Arduino_Library ;