@@ -31,7 +31,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31
31
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
32
33
33
34
- The software and related material is released as “NOMAS” (NOt MAnufacturer Supported).
34
+ The software and related material is released as “NOMAS” (NOt MAnufacturer Supported).
35
35
36
36
1. Info is released to assist customers using, exploring and extending the product
37
37
2. Do NOT contact the manufacturer with questions, seeking support, etc. regarding
@@ -45,6 +45,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45
45
46
46
#include <stdint.h>
47
47
48
+ #ifdef __cplusplus
49
+ extern "C" {
50
+ #endif // __cplusplus
51
+
48
52
typedef unsigned int uint ;
49
53
50
54
#include "ff_ifc.h"
@@ -134,8 +138,8 @@ typedef struct {
134
138
uint8_t char_cnt ;
135
139
uint8_t scale_x ;
136
140
uint8_t scale_y ;
137
- uint8_t const * data ;
138
- uint16_t const * offs ;
141
+ const uint8_t * data ;
142
+ const uint16_t * offs ;
139
143
} line_font_t ;
140
144
141
145
@@ -144,21 +148,22 @@ typedef struct {
144
148
145
149
// Font display state
146
150
typedef struct {
147
- line_font_t const * f ; // Current font
148
- int16_t x , y ; // Current x,y position
149
- int16_t ln_offs ; // Line offset (when displaying by line numbers)
150
- int16_t y_top_grd ; // Don't overwrite anything above this line
151
- int8_t ya ; // Lines to fill above the font
152
- int8_t yb ; // Lines to fill below the font
153
- int8_t xspc ; // Space between chars
154
- int8_t xoffs ; // X offset for first char on line
155
-
156
- uint8_t fixed ; // Draw in fixed width
157
- uint8_t inv ; // Draw inverted
158
- uint8_t bgfill ; // Fill background while drawing
159
- uint8_t lnfill ; // Fill whole lines before writing line
160
- uint8_t newln ; // New line after writing line
161
- const uint8_t * post_offs ; // X-advance character width minus this value (if not-null)
151
+ const line_font_t * f ; // Current font
152
+ int16_t x , y ; // Current x,y position
153
+ int16_t ln_offs ; // Line offset (when displaying by line numbers)
154
+ int16_t y_top_grd ; // Don't overwrite anything above this line
155
+ int8_t ya ; // Lines to fill above the font
156
+ int8_t yb ; // Lines to fill below the font
157
+ int8_t xspc ; // Space between chars
158
+ int8_t xoffs ; // X offset for first char on line
159
+
160
+ uint8_t fixed ; // Draw in fixed width
161
+ uint8_t inv ; // Draw inverted
162
+ uint8_t bgfill ; // Fill background while drawing
163
+ uint8_t lnfill ; // Fill whole lines before writing line
164
+ uint8_t newln ; // New line after writing line
165
+ const uint8_t
166
+ * post_offs ; // X-advance character width minus this value (if not-null)
162
167
} disp_stat_t ;
163
168
164
169
void lcd_writeNl (disp_stat_t * ds );
@@ -192,7 +197,7 @@ int lcd_textToWidthR(disp_stat_t * ds, const char* text, int expected_width, int
192
197
void lcd_writeTextWidth (disp_stat_t * ds , const char * text );
193
198
194
199
// Get text which fits in expected width *without breaking words*
195
- // - word could be broken in the middle only when is placed single long word on line
200
+ // - word could be broken in the middle only when is placed single long word on line
196
201
int lcd_textForWidth (disp_stat_t * ds , const char * text , int expected_width , int * plen );
197
202
198
203
@@ -462,7 +467,7 @@ int read_key(int *k1, int *k2);
462
467
463
468
464
469
/////////////////////////////////
465
- // Low level diagnostics
470
+ // Low level diagnostics
466
471
/////////////////////////////////
467
472
468
473
void suspended_bg_key_read ();
@@ -515,7 +520,7 @@ int qspi_user_size();
515
520
// ----------------------------------
516
521
517
522
518
- // Printer
523
+ // Printer
519
524
#define PRINT_GRA_LN 1
520
525
#define PRINT_TXT_LN 0
521
526
@@ -653,7 +658,7 @@ int handle_menu(const smenu_t * menu_id, int action, int cur_line);
653
658
// === Menu formatting support
654
659
const char * rb_str (int val );
655
660
const char * sel_str (int val );
656
- char * opt_str (char * s , char const * txt , int val );
661
+ char * opt_str (char * s , const char * txt , int val );
657
662
char * date_str (char * s , const char * txt );
658
663
char * time_str (char * s , const char * txt );
659
664
@@ -815,7 +820,7 @@ int run_menu_item_sys(uint8_t line_id);
815
820
#define VAL_ST (x ) VAL(x,calc_state)
816
821
#define CLR_ST (x ) CLR(x,calc_state)
817
822
#define SET_ST (x ) SET(x,calc_state)
818
- #define SETMSK_ST (x ,m ) SETMSK(x,m,calc_state)
823
+ #define SETMSK_ST (x ,m ) SETMSK(x,m,calc_state)
819
824
#define SETBY_ST (c ,x ) SETBY(c,x,calc_state)
820
825
821
826
@@ -901,8 +906,17 @@ int is_menu_auto_off();
901
906
int sys_auto_off_cnt ();
902
907
903
908
// Time/date
904
- void print_dmy_date (char * s , int const sz , dt_t * dt , const char * append , int shortmon , char sep_arg );
905
- void print_clk24_time (char * t , int const sz , tm_t * tm , int disp_sec , int disp_dow );
909
+ void print_dmy_date (char * s ,
910
+ const int sz ,
911
+ dt_t * dt ,
912
+ const char * append ,
913
+ int shortmon ,
914
+ char sep_arg );
915
+ void print_clk24_time (char * t ,
916
+ const int sz ,
917
+ tm_t * tm ,
918
+ int disp_sec ,
919
+ int disp_dow );
906
920
907
921
908
922
// Check and create dir
@@ -933,7 +947,7 @@ int sys_timer_active(int timer_ix);
933
947
int sys_timer_timeout (int timer_ix );
934
948
935
949
// Millisecond delay
936
- void sys_delay (uint32_t ms_delay );
950
+ void sys_delay (uint32_t ms_delay );
937
951
938
952
// Current systick count
939
953
uint32_t sys_tick_count ();
@@ -1011,4 +1025,8 @@ int update_bmp_file_header(FIL* fp, int width, int height, uint32_t bg_color);
1011
1025
1012
1026
#include "lft_ifc.h"
1013
1027
1028
+ #ifdef __cplusplus
1029
+ }
1030
+ #endif // __cplusplus
1031
+
1014
1032
#endif
0 commit comments