DMCP interface 03.18_025
Loading...
Searching...
No Matches
dmcp.h
1#ifndef __SYS_DMCP_H__
2#define __SYS_DMCP_H__
3
4
5
6#include <stdint.h>
7
8typedef unsigned int uint;
9
10// Remove space before ! in next line to enable Intro page
11/* ! \mainpage Introduction
12 *
13 * \section intro_sec Introduction
14 *
15 * This is the introduction.
16 *
17 * \section install_sec Installation
18 *
19 * \subsection step1 Step 1: Opening the box
20 *
21 * etc...
22 */
23
24
25// --------------------------------------
27// -------------------------------------
28
29
30// -----------------------------------
32// ----------------------------------
47// -----------------------------------
49// ----------------------------------
64// -----------------------------------
66// ----------------------------------
81// --------------------------------------
83// -------------------------------------
92// --------------------------------------
94// -------------------------------------
112// ----------------------------------------
114// ---------------------------------------
115
132// -----------------------------------
134// ----------------------------------
135
149// -----------------------------------
151// ----------------------------------
152
168// -----------------------------------
170// ----------------------------------
171
191#include "ff_ifc.h"
192
193#include "qrcode_ifc.h"
194
195
196
229void qrcode_disp(QRCode *qr, int xo, int yo, int z);
230
512#define USIN_CHAN_CNT 4
513#define USIN_CHAN_SIZE 256
514#define USIN_MAX_READLINES 16
516#define US_OVERFLOW_CHAR '\x0f'
517#define US_LINEEND_CHAR '\n'
518#define US_CHAN0_CHAR '\x10'
519#define US_MAX_CHANS 11
522#define SER_IOCTL_READ ((int)(1<<31))
524#define SER_IOCTL_INVALID ((int)(1<<31))
526// USB serial ioctl ops
527#define SERIO_IS_ENABLED 0x01
528#define SERIO_IS_ACTIVE 0x02
529#define SERIO_IS_CONNECTED 0x03
531#define SERIO_LINE_READY 0x08
532#define SERIO_LINE_LENGTH 0x09
534#define SERIO_SEND_PRINTF 0x10
535#define SERIO_SEND_LCD 0x11
536#define SERIO_SEND_KEYS 0x12
537#define SERIO_SEND_IR 0x13
540// USB serial input channels
541#define US_ICHAN_KEY 0
542#define US_ICHAN_SYS 1
543// USB serial output channels
544#define US_OCHAN_SYS 0
545#define US_OCHAN_PRINTF 1
555void usb_serial_write(uint8_t chan_nr, const char* buf, int len);
556
557
563void usb_serial_puts(uint8_t chan_nr, const char* str);
564
565
594int usb_serial_read_line(uint8_t chan_nr, uint8_t *buf, int buflen, uint8_t *is_overflow);
595
596
632int usb_serial_ioctl(int op, int val);
633
634
646// HW interface
647
652
657
661void LCD_power_off(int clear);
662
678void LCD_write_line(uint8_t * buf);
679
694// --------------------------------------
696// -------------------------------------
702// Configuration
703#define LCD_INVERT_XAXIS
704#define LCD_INVERT_DATA
705// -------
706
707
708#define BLT_OR 0
709#define BLT_ANDN 1
710#define BLT_XOR 2
712#define BLT_NONE 0
713#define BLT_SET 1
716#ifdef LCD_INVERT_DATA
717# define LCD_EMPTY_VALUE 0xFF
718# define LCD_SET_VALUE 0
719#else
720# define LCD_EMPTY_VALUE 0
721# define LCD_SET_VALUE 0xFF
722#endif
723
724#define LCD_X 400
725#define LCD_Y 240
726#define LCD_LINE_SIZE 50
727#define LCD_LINE_BUF_SIZE (LCD_LINE_SIZE+4)
734// Drawing Prototypes
735
740
746
752
757
762
766void lcd_refresh_lines(int ln, int cnt);
767
768
787void bitblt24(uint32_t x, uint32_t dx, uint32_t y, uint32_t val, int blt_op, int fill);
788
789
790
798uint8_t * lcd_line_addr(int y);
799
800
809void lcd_fill_rect(uint32_t x, uint32_t y, uint32_t dx, uint32_t dy, int val);
810
811
821void lcd_fill_ptrn(int x, int y, int dx, int dy, int ptrn1, int ptrn2);
822
823
831void lcd_fillLine(int ln, uint8_t val);
832
833
842void lcd_fillLines(int ln, uint8_t val, int cnt);
843
844
853
863
864
870uint8_t reverse_byte(uint8_t x);
871
885#define SCR_DIR "/SCREENS"
886
890#define OFFIMG_DIR "/OFFIMG"
891
892
893
894// Screenshot
903int create_screenshot(int report_error);
904
905// Place image into LCD buffer
906
918void lcd_draw_img(const char* img, uint32_t xo, uint32_t yo, uint32_t x, uint32_t y);
919
920
932void lcd_draw_img_direct(const char* img, uint32_t xo, uint32_t yo, uint32_t x, uint32_t y);
933
934
947void lcd_draw_img_part(const char* img, uint32_t xo, uint32_t yo, uint32_t x, uint32_t y, uint32_t dx);
948
949
950
951// Off images
957void draw_power_off_image(int allow_errors);
958
965
966#define BG_COL_PAPER 0xf4f2dc
967#define BG_COL_LCD 0xdff5cc
985int update_bmp_file_header(FIL* fp, int width, int height, uint32_t bg_color);
986
987
988// ----------------------------------
989
990
994// ----------------------------------
995
1009typedef struct {
1010 const char * name;
1011 uint8_t width;
1012 uint8_t height;
1013 uint8_t baseline;
1014 uint8_t first_char;
1015 uint8_t char_cnt;
1016 uint8_t scale_x;
1017 uint8_t scale_y;
1018 uint8_t const * data;
1019 uint16_t const * offs;
1020} line_font_t;
1021
1022
1026#define NR2T(x) (-(x)-1) // x<0
1027
1031#define T2NR(x) (-(x)-1) // x>=0
1032
1033
1039typedef struct {
1040 line_font_t const * f;
1041 int16_t x;
1042 int16_t y;
1043 int16_t ln_offs;
1044 int16_t y_top_grd;
1045 int8_t ya;
1046 int8_t yb;
1047 int8_t xspc;
1048 int8_t xoffs;
1050 uint8_t fixed;
1051 uint8_t inv;
1052 uint8_t bgfill;
1053 uint8_t lnfill;
1054 uint8_t newln;
1064 const uint8_t *post_offs;
1065} disp_stat_t;
1066
1067
1068
1074
1080
1086
1087
1093void lcd_setLine(disp_stat_t * ds, int ln_nr);
1094
1095
1102void lcd_setXY(disp_stat_t * ds, int x, int y);
1103
1110
1111
1118
1119
1126
1127
1136void lcd_writeText(disp_stat_t * ds, const char* text);
1137
1154void lcd_textToBox(disp_stat_t * ds, int x, int width, char *text, int from_right, int align_right);
1155
1156
1157
1164int lcd_textWidth(disp_stat_t * ds, const char* text);
1165
1173
1174
1175
1186int lcd_textToWidth(disp_stat_t * ds, const char* text, int expected_width, int * plen);
1187
1188
1189
1200int lcd_textToWidthR(disp_stat_t * ds, const char* text, int expected_width, int * plen);
1201
1202
1203
1211void lcd_writeTextWidth(disp_stat_t * ds, const char* text);
1212
1213
1228int lcd_textForWidth(disp_stat_t * ds, const char* text, int expected_width, int * plen);
1229
1230
1231
1238int lcd_nextFontNr(int nr);
1239
1246int lcd_prevFontNr(int nr);
1247
1253void lcd_switchFont(disp_stat_t * ds, int nr);
1254
1260
1261
1267void lcd_print(disp_stat_t * ds, const char* fmt, ...);
1268
1269
1275#define lcd_printAt(ds, ln, ...) do { lcd_setLine(ds, ln); lcd_print(ds, __VA_ARGS__); } while(0)
1276
1281#define lcd_printR(ds, ...) do { ds->inv=1; lcd_print(ds, __VA_ARGS__); ds->inv=0; } while(0)
1282
1288#define lcd_printRAt(ds, ln, ...) do { lcd_setLine(ds, ln); ds->inv=1; lcd_print(ds, __VA_ARGS__); ds->inv=0; } while(0)
1289
1293#define lcd_puts lcd_writeText
1294
1301#define lcd_putsAt(ds, ln, str) do { lcd_setLine(ds, ln); lcd_puts(ds,str); } while(0)
1302
1308#define lcd_putsR(ds, str) do { ds->inv=1; lcd_puts(ds,str); ds->inv=0; } while(0)
1309
1310
1317#define lcd_putsRAt(ds, ln, str) do { lcd_setLine(ds, ln); ds->inv=1; lcd_puts(ds,str); ds->inv=0; } while(0)
1318
1323// ----------------------------------
1324
1325
1332#define DISP_CALC 0
1333#define DISP_SYS_MENU 2
1334#define DISP_BOOTLOADER 4
1335#define DISP_UNIMPLEMENTED 5
1336#define DISP_USB_WRITE 6
1337#define DISP_MSC_CONNECT_USB 7
1338#define DISP_ABOUT 8
1339#define DISP_FAT_FORMAT 9
1340#define DISP_FAULT 11
1341#define DISP_QSPI_BAD_CRC 12
1342#define DISP_QSPI_CHECK 13
1343#define DISP_MARK_REGION 15
1344#define DISP_DISK_TEST 16
1345#define DISP_DSKTST_CONNECT_USB 17
1346#define DISP_QSPI_CONNECT_USB 18
1347#define DISP_OFF_IMAGE_ERR 19
1348#define DISP_HELP 21
1349#define DISP_BOOTLDR_CON_USB 22
1350#define DISP_PROD_DIAG 23
1351#define DISP_POWER_CHECK 24
1352#define DISP_FLASH_CONNECT_USB 26
1353// ----
1354
1355
1361int lcd_for_calc(int what);
1362
1373#define LCD_MENU_LINES 32
1375#define MENU_KEY_LABEL_LEN 12
1376#define MENU_KEY_COUNT 6
1380
1386void lcd_draw_menu_key(int nr, const char *key, int highlight);
1387
1393void lcd_draw_menu_keys(const char *keys[]);
1394
1399// ----------------------------------
1400
1401
1408// === Date/Time
1409
1410
1411
1416#define PRINT_DT_TM_SZ 20
1417
1418
1422typedef struct {
1423 uint16_t year;
1424 uint8_t month;
1425 uint8_t day;
1426} dt_t;
1427
1431typedef struct {
1432 uint8_t hour;
1433 uint8_t min;
1434 uint8_t sec;
1435 uint8_t csec;
1441 uint8_t dow;
1442} tm_t;
1443
1448const char* get_wday_shortcut(int day); // 0 = Monday
1453const char* get_month_shortcut(int month); // 1 = Jan
1454
1459
1464
1476void print_dmy_date(char * s, int const sz, dt_t *dt, const char * prefix, int shortmon, char sep_arg);
1477
1488void print_clk24_time(char * t, int const sz, tm_t *tm, int disp_sec, int disp_dow);
1489
1493// ----------------------------------
1494
1504// System data block (SDB)
1505
1506
1507
1508
1509
1523typedef int get_flag_fn_t();
1524typedef void set_flag_fn_t(int val);
1536
1544
1545
1551
1557
1558
1564
1570
1579
1580
1581
1585typedef void void_fn_t();
1586
1590uint32_t calc_state;
1591
1598
1599
1600
1608
1609
1610
1611
1624
1629
1650
1657
1664
1677// ----------------------------------
1678
1679#define PLATFORM_VERSION "3.20"
1680
1681// System interface version
1682#define PLATFORM_IFC_CNR 3
1683#define PLATFORM_IFC_VER 15
1684
1685// STATIC_ASSERT ...
1686#define ASSERT_CONCAT_(a, b) a##b
1687#define ASSERT_CONCAT(a, b) ASSERT_CONCAT_(a, b)
1688#define STATIC_ASSERT(e,m) ;enum { ASSERT_CONCAT(assert_line_, __LINE__) = 1/(int)(!!(e)) }
1689//#define STATIC_ASSERT(expr, msg) typedef char ASSERT_CONCAT(static_assert_check_, __LINE__) [(expr) ? (+1) : (-1)]
1690
1691#define _STRINGIFY(x) #x
1692#define STR(x) _STRINGIFY(x)
1693
1694#define BIT(n) (1<<(n))
1695
1696
1697
1698
1724int qspi_user_write(uint8_t *data, int size, int offset, int erase);
1725
1730uint8_t * qspi_user_addr();
1731
1737
1738
1756void rtc_read(tm_t * tm, dt_t *dt);
1757
1763void rtc_write(tm_t * tm, dt_t *dt);
1764
1765
1770void rtc_update_time_sec(int delta_sec);
1771
1772
1780
1792void rtc_write_century(uint8_t cent);
1793
1799
1805
1813
1814
1824
1825
1826
1830#define RTCREGS_SS_PER_SEC 256
1831
1832
1840uint32_t get_rtc_ticks();
1841
1842
1843
1847typedef struct {
1848 uint32_t dt;
1849 uint32_t tm;
1850 uint16_t ss;
1852
1853
1857typedef struct {
1859 uint64_t dsec;
1860 uint32_t jday;
1861 uint32_t sec;
1862 uint32_t msec;
1864
1865
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1888void rtc_set_alarm(tm_t * tm, dt_t *dt);
1889
1890
1895
1896
1897
1910// ==== VBAT
1911
1917
1923
1929
1930// ==== USB functions
1936
1949// ==== Buzzer
1950
1951// Freq in mHz
1952
1957void start_buzzer_freq(uint32_t freq);
1958
1963
1969void set_buzzer(int pin1val, int pin2val);
1970
1971
1976
1981
1987
2007// ==== REGIONS
2008
2013uint32_t mark_region(uint32_t id);
2014
2019
2029// ==== RESET values
2030
2031#define NO_SPLASH_MAGIC 0xEACE7362
2032#define ALLOC_FAIL_MAGIC 0x363EACE7
2033#define CLEAN_RESET_MAGIC 0x3EACE736
2034#define RUN_DMCP_MAGIC 0x3CE7EA37
2041void set_reset_magic(uint32_t value);
2042
2043
2044
2045// === RESET STATE FILE
2046
2047#define RESET_STATE_FILE_SIZE 0x38
2054
2060
2070void set_reset_state_file(const char * str);
2071
2072
2077
2078
2105// Aux buf
2106#define AUX_BUF_SIZE (5*512)
2113
2119
2125
2126
2131
2140
2148// Program info structure
2149#define PROG_INFO_MAGIC 0xd377C0DE
2150
2151void program_main();
2152
2155typedef struct {
2156 uint32_t pgm_magic;
2157 uint32_t pgm_size;
2158 void * pgm_entry;
2159 uint32_t ifc_cnr;
2160 uint32_t ifc_ver;
2161 uint32_t qspi_size;
2162 uint32_t qspi_crc;
2163 char pgm_name[16];
2164 char pgm_ver[16];
2165} prog_info_t;
2166
2170// Keyboard
2171int read_key(int *k1, int *k2);
2172void suspended_bg_key_read();
2173void resume_bg_key_read();
2174
2175
2176// Timer
2177uint32_t get_tim1_timer();
2178
2179
2180// Base frequency 8MHz
2181#define TIMER_BASE_FREQ (8000000)
2182void start_timer2(uint32_t div32);
2183void start_timer3(uint16_t div16);
2184void stop_timer2();
2185void stop_timer3();
2186
2187
2188
2189
2190
2191
2192
2193
2194// ----------------------------------
2195
2243// Printer
2244#define PRINT_GRA_LN 1
2245#define PRINT_TXT_LN 0
2247#define MAX_82240_WIDTH 166
2248#define DFLT_82240_LINE_DUR 1800
2256void print_byte(uint8_t b);
2257
2258
2267void print_buffer(uint8_t * buf, int cnt);
2268
2269
2270
2276
2277
2278
2279// Printer delay in ms
2285
2290void printer_set_delay(uint val);
2291
2299void printer_advance_buf(int what);
2300
2308int printer_busy_for(int what);
2309
2314// ----------------------------------
2315
2331// --------------------------------
2332// Menu pages
2333// --------------------------------
2334
2335
2343typedef struct {
2344 const char * name;
2345 const uint8_t * items;
2355 const char* const * msg;
2356
2361} smenu_t;
2362
2363
2364// --------------------------------------
2366// -------------------------------------
2376extern const smenu_t MID_SYS_WARN;
2377extern const smenu_t MID_SYSTEM;
2378extern const smenu_t MID_FAT_FORMAT;
2379extern const smenu_t MID_DSKTST_ENTER;
2380extern const smenu_t MID_PROD_DIAG;
2381extern const smenu_t MID_PROD_DIAG2;
2382extern const smenu_t MID_DMCP;
2383extern const smenu_t MID_BASE_SETUP;
2391// --------------------------------------
2393// -------------------------------------
2404#define MI_SYSTEM 192
2405#define MI_BOOTLOADER 193
2406#define MI_QSPI_LOADER 194
2407#define MI_DIAG 195
2408#define MI_MSC 196
2409#define MI_ABOUT 197
2410#define MI_BASE_SETUP 198
2411#define MI_BEEP_MUTE 199
2412#define MI_SYSTEM_ENTER 200
2413#define MI_RELOAD_RESET 201
2414#define MI_SET_TIME 202
2415#define MI_SET_DATE 203
2416#define MI_FF_ENTER 204
2417#define MI_FAT_FORMAT 205
2418#define MI_DISK_TEST 206
2419#define MI_DSKTST_ENTER 207
2420#define MI_DISK_INFO 208
2421#define MI_LOAD_QSPI 209
2422#define MI_SLOW_AUTOREP 210
2424#define MI_EXIT 211
2426#define MI_KBD_TEST 212
2427#define MI_LCD_TEST 213
2428#define MI_IR_TEST 214
2429#define MI_BEEP_TEST 215
2430#define MI_DMCP_MENU 216
2432#define MI_SELF_TEST 217
2434#define MI_RAMFLASH 218
2436#define MI_PGM_INFO 219
2437#define MI_PGM_RUN 220
2438#define MI_PGM_LOAD 221
2440#define MI_RUN_DMCP 222
2442#define MI_OFF_MODE 223
2443// --------------------------------
2444
2445
2452typedef int run_menu_item_fn_t(uint8_t line_id);
2453
2457typedef const char * menu_line_str_fn_t(uint8_t line_id, char * s, const int slen);
2458
2459
2460// --------------------------------------
2462// -------------------------------------
2467// --------------------------------
2468#define MENU_MAX_LEVEL 8
2470#define MENU_FONT t24
2471#define MENU_LCD_LINES 8
2473#define MENU_RESET 0
2474#define MENU_ADD 1
2476#define MRET_UNIMPL -1
2477#define MRET_EXIT -2
2483#define MRET_LEAVELIMIT 512
2484// --------------------------------
2489// === Base menu functions ===
2498int handle_menu(const smenu_t * menu_id, int action, int cur_line);
2499
2500
2508int run_menu_item_sys(uint8_t line_id);
2509
2510
2520int run_menu_item(uint8_t line_id);
2521
2533const char * menu_line_str(uint8_t line_id, char * ln, const int ln_len);
2534
2535
2536// --------------------------------------
2538// -------------------------------------
2546// === Menu formatting support
2552const char * rb_str(int val);
2553
2554
2560const char * sel_str(int val);
2561
2570char * opt_str(char * s, char const *txt, int val);
2571
2579char * date_str(char * s, const char * txt);
2580
2588char * time_str(char * s, const char * txt);
2589
2609
2614
2615// === Base dialogs
2619void disp_disk_info(const char * hdr);
2620
2630
2631// === File selection ===
2632
2634#define MAX_PGM_FN_LEN 24
2645typedef int (*file_sel_fn_t)(const char * fpath, const char * fname, void * data);
2646
2659int file_selection_screen(const char * title, const char * base_dir, const char * ext, file_sel_fn_t sel_fn,
2660 int disp_new, int overwrite_check, void * data);
2661
2662
2680// ---------------------------------------------------
2681// Item selection screen
2682// ---------------------------------------------------
2683
2691#define ISEL_FILL_ITEMS -100
2692
2700#define ISEL_KEY_PRESSED -101
2701
2709#define ISEL_EXIT -102
2710
2718#define ISEL_POST_DRAW -2
2719
2727#define ISEL_PRE_DRAW -1
2728
2729
2733typedef uint16_t list_item_t;
2734
2735struct item_sel_state;
2736
2740typedef void isel_disp_line_fn_t(int lnr, list_item_t *fis, int cur_fnr, struct item_sel_state *st);
2741
2745typedef void fis_name_fn_t(struct item_sel_state *st, list_item_t fis, char * nmbuf, int len);
2746
2747
2751typedef struct item_sel_state {
2752 int8_t fnr;
2753 int8_t top_nr;
2754 int8_t lncnt;
2755 int8_t roll_lines;
2756 int8_t key;
2761 int fcnt;
2763 // -- Set by user --
2764 const char * title;
2765 char * title2;
2767 char * lnbuf;
2770 void * data;
2771 void * items;
2774
2775
2783
2784
2792
2793
2800
2801
2812void item_sel_header(item_sel_state_t *st, int update);
2813
2814
2823// ---------------------------------------------------
2824
2843void msg_box(disp_stat_t * ds, const char * txt, int inv);
2844
2847// ----------------------------------
2848
2849
2850#define MAX_LCD_LINE_LEN 40
2851
2852
2853// -----------------------
2854// Bit masks operations
2855// -----------------------
2856#define VAL(x,val) ((x) & (val))
2857#define CLR(x,val) val &= ~(x)
2858#define SET(x,val) val |= (x)
2859#define MSK(x,val) (~(x) & (val))
2860#define SETMSK(x,m,val) val = (MSK(m,val)|(x))
2861//#define SETBY(c,x,val) (c) ? SET(x,val) : CLR(x,val)
2862#define SETBY(c,x,val) if (c) { SET(x,val); } else { CLR(x,val); }
2863
2864
2865
2866
2867
2868
2869#define ST(x) VAL(x,calc_state)
2870#define VAL_ST(x) VAL(x,calc_state)
2871#define CLR_ST(x) CLR(x,calc_state)
2872#define SET_ST(x) SET(x,calc_state)
2873#define SETMSK_ST(x,m) SETMSK(x,m,calc_state)
2874#define SETBY_ST(c,x) SETBY(c,x,calc_state)
2875
2876
2877
2878#define STAT_CLEAN_RESET BIT(0)
2879#define STAT_RUNNING BIT(1)
2880#define STAT_SUSPENDED BIT(2)
2881#define STAT_KEYUP_WAIT BIT(3)
2882#define STAT_OFF BIT(4)
2883#define STAT_SOFT_OFF BIT(5)
2884#define STAT_MENU BIT(6)
2885#define STAT_BEEP_MUTE BIT(7)
2886#define STAT_SLOW_AUTOREP BIT(8)
2887#define STAT_PGM_END BIT(9)
2888#define STAT_CLK_WKUP_ENABLE BIT(10)
2889#define STAT_CLK_WKUP_SECONDS BIT(11) // 0 - wakeup runner each minute, 1 - each second
2890#define STAT_CLK_WKUP_FLAG BIT(12)
2891#define STAT_DMY BIT(13)
2892#define STAT_CLK24 BIT(14)
2893#define STAT_POWER_CHANGE BIT(15)
2894
2895#define STAT_HW_BEEP BIT(28)
2896#define STAT_HW_USB BIT(29)
2897#define STAT_HW_IR BIT(30)
2898
2899#define STAT_HW (STAT_HW_BEEP | STAT_HW_USB | STAT_HW_IR)
2900
2901
2902
2903
2904
2905
2906// --------------------------------------
2907
2908// -------------------------------------
2917#define MAX_KEY_NR 37
2918#define MAX_FNKEY_NR 43
2921// -------------
2922// Key codes
2923// -------------
2924
2925#define KEY_SIGMA 1
2926#define KEY_INV 2
2927#define KEY_SQRT 3
2928#define KEY_LOG 4
2929#define KEY_LN 5
2930#define KEY_XEQ 6
2931#define KEY_STO 7
2932#define KEY_RCL 8
2933#define KEY_RDN 9
2934#define KEY_SIN 10
2935#define KEY_COS 11
2936#define KEY_TAN 12
2937#define KEY_ENTER 13
2938#define KEY_SWAP 14
2939#define KEY_CHS 15
2940#define KEY_E 16
2941#define KEY_BSP 17
2942#define KEY_UP 18
2943#define KEY_7 19
2944#define KEY_8 20
2945#define KEY_9 21
2946#define KEY_DIV 22
2947#define KEY_DOWN 23
2948#define KEY_4 24
2949#define KEY_5 25
2950#define KEY_6 26
2951#define KEY_MUL 27
2952#define KEY_SHIFT 28
2953#define KEY_1 29
2954#define KEY_2 30
2955#define KEY_3 31
2956#define KEY_SUB 32
2957#define KEY_EXIT 33
2958#define KEY_0 34
2959#define KEY_DOT 35
2960#define KEY_RUN 36
2961#define KEY_ADD 37
2963#define KEY_F1 38
2964#define KEY_F2 39
2965#define KEY_F3 40
2966#define KEY_F4 41
2967#define KEY_F5 42
2968#define KEY_F6 43
2970#define KEY_SCREENSHOT 44
2971#define KEY_SH_UP 45
2972#define KEY_SH_DOWN 46
2974#define KEY_DOUBLE_RELEASE 99
2976#define KEY_PAGEUP KEY_DIV
2977#define KEY_PAGEDOWN KEY_MUL
2988// ---------------------------
2989// Key buffer functions
2990// ---------------------------
2991
2997
3003int key_push(int k1);
3004
3010
3016
3017
3022int key_pop_last();
3029
3030
3031// Key functions
3037int key_to_nr(int key);
3038
3039// Key
3045
3055
3061
3062
3063
3088int runner_get_key(int *repeat);
3089
3101int runner_get_key_delay(int *repeat, uint timeout, uint rep0, uint rep1, uint rep1tout);
3102
3103
3104// ---------------------------
3105// Runner get key
3106// ---------------------------
3107
3122int runner_key_tout_value(const int first);
3123
3124
3125
3135// Autorepeat
3140
3145
3157void runner_key_tout_init(const int slow);
3158
3159
3160
3171// Auto off
3172
3173
3174#define AUTO_OFF_SECONDS 600
3175#define AUTO_OFF_MENU 300
3182
3188
3194
3200
3218// Check and create dir
3219// returns 0 on success
3220int check_create_dir(const char * dir);
3221
3227int file_exists(const char * fn);
3228
3234int file_size(const char * fn);
3235
3236
3252void make_date_filename(char * fn, const char * dir, const char * ext);
3253
3254
3274
3282
3288
3289
3305
3310void set_fat_label(const char * label);
3311
3328void sys_timer_disable(int timer_ix);
3329
3335void sys_timer_start(int timer_ix, uint32_t ms_value);
3336
3342int sys_timer_active(int timer_ix);
3343
3348int sys_timer_timeout(int timer_ix);
3349
3350
3351
3355void sys_delay(uint32_t ms_delay);
3356
3357// Current systick count
3358
3368
3374
3388// Critical sections
3389
3394
3399
3400// Sleep
3401
3406
3407// Free memory
3408
3414
3415// ==== HW ID
3416
3423uint8_t get_hw_id();
3424
3439// ---------------------------
3440// Flashing
3441// ---------------------------
3442
3443
3448
3456int sys_flash_erase_block(void* start_addr, uint32_t size);
3457
3466int sys_flash_write_block(void* dst_addr, uint8_t * src_buf, uint32_t size);
3467
3470// ---------------------------
3471
3472
3491// ----------------------------------
3492
3493
3494// Help
3495#define HELP_INDEX "/HELP/index.htm"
3503
3504
3510void run_help_file(const char * help_file);
3511
3512
3518typedef void user_style_fn_t(char *class_attr, disp_stat_t *ds);
3519
3520
3535void run_help_file_style(const char * help_file, user_style_fn_t *user_style_fn);
3536
3537
3540// ----------------------------------
3541
3542
3543
3544#endif
3545
void stop_buzzer()
Stop tone.
int get_beep_volume()
Returns current tone volume.
void beep_volume_down()
Decrease tone volume.
void set_buzzer(int pin1val, int pin2val)
Set buzzer IO pins to given values.
void beep_volume_up()
Increase tone volume.
void start_buzzer_freq(uint32_t freq)
Start tone.
int sys_disk_write_enable(int val)
(En/Dis)able disk write mode
void set_fat_label(const char *label)
Sets disk label.
int sys_disk_ok()
Returns current disk status.
int sys_is_disk_write_enable()
Returns current disk write state.
void sys_disk_check_valid()
Update disk state based on low level disk state.
int check_create_dir(const char *dir)
Creates directory if doesn't exist.
int file_exists(const char *fn)
Check whether file exists.
int file_size(const char *fn)
Returns file size.
void make_date_filename(char *fn, const char *dir, const char *ext)
Creates filename using current date/time.
void run_help_file(const char *help_file)
Starts help screen.
void run_help_file_style(const char *help_file, user_style_fn_t *user_style_fn)
Starts help screen.
void user_style_fn_t(char *class_attr, disp_stat_t *ds)
Prototype for user style callback function.
Definition dmcp.h:3518
void run_help()
Starts default help screen.
void msg_box(disp_stat_t *ds, const char *txt, int inv)
Display message box.
int item_sel_engine(item_sel_state_t *st, int upd)
Main item selection engine loop.
void item_sel_header(item_sel_state_t *st, int update)
Display header for item selection dialog.
void isel_disp_line_fn_t(int lnr, list_item_t *fis, int cur_fnr, struct item_sel_state *st)
Display line callback prototype.
Definition dmcp.h:2740
void item_sel_reinit(item_sel_state_t *st)
Cleanup before items reload.
uint16_t list_item_t
Type for item list item_sel_state::fis.
Definition dmcp.h:2733
struct item_sel_state item_sel_state_t
Item selection state.
void item_sel_init(item_sel_state_t *st)
Initializes item sel structure.
void fis_name_fn_t(struct item_sel_state *st, list_item_t fis, char *nmbuf, int len)
Callback function for getting list item name.
Definition dmcp.h:2745
int(* file_sel_fn_t)(const char *fpath, const char *fname, void *data)
"File selected" callback for file_selection_screen()
Definition dmcp.h:2645
int power_check_screen()
Check power voltage and requests USB connection if power is low.
void run_set_time()
Activates "Set Time" screen.
void disp_disk_info(const char *hdr)
Activates "Disk Info" screen.
int file_selection_screen(const char *title, const char *base_dir, const char *ext, file_sel_fn_t sel_fn, int disp_new, int overwrite_check, void *data)
Displays file selection dialog.
void run_set_date()
Activates "Set Date" screen.
int sys_last_key()
Returns currently pressed key code.
int key_tail()
Check for key in key buffer.
int key_to_nr(int key)
Returns corresponding number for key code key.
void wait_for_key_press()
Wait for key press.
void key_pop_all()
Remove all keys from key buffer.
int key_pop()
Remove and return next key from key buffer.
int key_push(int k1)
Push key at the end of key buffer.
void wait_for_key_release(int tout)
Wait for key release or timeout.
int key_empty()
Check whether key buffer is empty.
int runner_key_tout_value(const int first)
Returns key repeat timeout value.
int runner_get_key(int *repeat)
Wait for key event or timeout.
int runner_get_key_delay(int *repeat, uint timeout, uint rep0, uint rep1, uint rep1tout)
Wait for key event or timeout with more autorepeat and timeout control.
int toggle_slow_autorepeat()
Toggle slow_autorepeat flag in system.
int is_slow_autorepeat()
Query slow autorepeat flag value.
void runner_key_tout_init(const int slow)
Initialize slow autorepeat flag.
void lcd_forced_refresh()
Write immediately whole LCD buffer to LCD regardless of dirty flags.
void lcd_refresh_dma()
Start non-blocking LCD refresh, LCD refresh continues in background (only dirty lines are updated)
uint8_t reverse_byte(uint8_t x)
Swaps bits in byte.
void lcd_refresh()
Start lcd refresh - could be blocking or non-blocking based on current system default (only dirty lin...
void lcd_set_buf_cleared(int val)
Sets 'LCD buffer cleared' flag.
int lcd_get_buf_cleared()
Reads 'LCD buffer cleared' flag.
void lcd_fillLines(int ln, uint8_t val, int cnt)
Fill LCD lines with value.
void lcd_fill_rect(uint32_t x, uint32_t y, uint32_t dx, uint32_t dy, int val)
Fills rectangular area of LCD.
void lcd_refresh_lines(int ln, int cnt)
Write immediately lines [ln .. ln+cnt-1] to LCD.
void lcd_refresh_wait()
Issue LCD refresh and wait until done (only dirty lines are updated)
void lcd_clear_buf()
Clear LCD buffer.
void lcd_fillLine(int ln, uint8_t val)
Fill LCD line with value.
uint8_t * lcd_line_addr(int y)
Returns pointer to line data (doesn't depend on LCD_INVERT_XAXIS)
void lcd_fill_ptrn(int x, int y, int dx, int dy, int ptrn1, int ptrn2)
Fills rectangular area with prescribed pattern.
void bitblt24(uint32_t x, uint32_t dx, uint32_t y, uint32_t val, int blt_op, int fill)
Blits dx bits from val at position x, y.
void draw_power_off_image(int allow_errors)
Draw subsequent image from OFFIMG_DIR directory.
int update_bmp_file_header(FIL *fp, int width, int height, uint32_t bg_color)
Write or update .bmp file header.
void lcd_draw_img_direct(const char *img, uint32_t xo, uint32_t yo, uint32_t x, uint32_t y)
Put image directly on LCD.
void lcd_draw_img(const char *img, uint32_t xo, uint32_t yo, uint32_t x, uint32_t y)
Put image into LCD buffer.
void reset_off_image_cycle()
Resets off image loop to first image.
void lcd_draw_img_part(const char *img, uint32_t xo, uint32_t yo, uint32_t x, uint32_t y, uint32_t dx)
Put part of image into LCD buffer.
int create_screenshot(int report_error)
Create screenshot.
int lcd_for_calc(int what)
Displays predefined static screen by id.
void lcd_draw_menu_key(int nr, const char *key, int highlight)
void lcd_draw_menu_keys(const char *keys[])
void lcd_draw_menu_bg()
int lcd_nextFontNr(int nr)
Get next (bigger) font number.
int lcd_fontWidth(disp_stat_t *ds)
Returns width of font.
int lcd_charWidth(disp_stat_t *ds, int c)
Returns width of character.
int lcd_toggleFontT(int nr)
Toggle font number between normal and TT font.
void lcd_print(disp_stat_t *ds, const char *fmt,...)
Print formatted string.
void lcd_setXY(disp_stat_t *ds, int x, int y)
Jump to pixel position (x,y)
int lcd_baseHeight(disp_stat_t *ds)
Returns baseline position.
void lcd_writeClr(disp_stat_t *ds)
Jump to first line.
void lcd_writeNl(disp_stat_t *ds)
Jump to next line.
void lcd_textToBox(disp_stat_t *ds, int x, int width, char *text, int from_right, int align_right)
Display text in confined area.
int lcd_textToWidth(disp_stat_t *ds, const char *text, int expected_width, int *plen)
Determines which part of text fits in expected_width.
void lcd_prevLn(disp_stat_t *ds)
Jump to previous line.
void lcd_switchFont(disp_stat_t *ds, int nr)
Set current font to given font number.
void lcd_writeTextWidth(disp_stat_t *ds, const char *text)
Updates display state as if lcd_writeText() was be called.
void lcd_setLine(disp_stat_t *ds, int ln_nr)
Jump to given line.
int lcd_lineHeight(disp_stat_t *ds)
Returns line height.
void lcd_writeText(disp_stat_t *ds, const char *text)
Display text.
int lcd_textForWidth(disp_stat_t *ds, const char *text, int expected_width, int *plen)
Calculate text width without breaking words
int lcd_textWidth(disp_stat_t *ds, const char *text)
Calculates width of text.
int lcd_textToWidthR(disp_stat_t *ds, const char *text, int expected_width, int *plen)
Determines which part of text from the end of the string fits in expected_width.
int lcd_prevFontNr(int nr)
Get previous (smaller) font number.
void LCD_power_off(int clear)
Powers off the LCD hardware.
void LCD_power_on()
Powers on the LCD hardware.
void LCD_write_line(uint8_t *buf)
Sends line data to LCD.
void LCD_clear()
Sends clear command to LCD.
const char * sel_str(int val)
Returns 'cross' selection string.
char * opt_str(char *s, char const *txt, int val)
Format selection string.
const char * rb_str(int val)
Returns 'dot' selection string.
char * date_str(char *s, const char *txt)
Formats text followed by date.
char * time_str(char *s, const char *txt)
Formats text followed by time.
const smenu_t MID_SYSTEM
System menu.
const smenu_t MID_DMCP
Top level system menu.
const smenu_t MID_SYS_WARN
System menu entry warning.
const smenu_t MID_PROD_DIAG2
Production diagnostic screen - selftest version in main menu.
const smenu_t MID_DSKTST_ENTER
Disk test menu.
const smenu_t MID_FAT_FORMAT
FAT format menu.
const smenu_t MID_BASE_SETUP
System setup menu.
const smenu_t MID_PROD_DIAG
Production diagnostic screen.
int run_menu_item_sys(uint8_t line_id)
Invoke particular sys menu function.
int run_menu_item_fn_t(uint8_t line_id)
Prototype for run_menu_item function.
Definition dmcp.h:2452
const char * menu_line_str(uint8_t line_id, char *ln, const int ln_len)
(Defined by user) Should return string representation of given menu item
const char * menu_line_str_fn_t(uint8_t line_id, char *s, const int slen)
Prototype for menu_line_str function.
Definition dmcp.h:2457
int handle_menu(const smenu_t *menu_id, int action, int cur_line)
Starts menu screen.
int run_menu_item(uint8_t line_id)
(Defined by user) Invoke functionality for selected menu item
int print_is_ready()
Check whether IR hw is ready for send.
void printer_set_delay(uint val)
Sets printer line delay.
void print_byte(uint8_t b)
Send byte to printer.
void print_buffer(uint8_t *buf, int cnt)
Send bytes to printer.
void printer_advance_buf(int what)
Add line type to printer buffer emulation.
int printer_busy_for(int what)
Wait until printer buffer is free for given line type.
uint printer_get_delay()
Returns current printer line delay.
uint32_t read_power_voltage()
Reads power voltage.
int usb_powered()
Returns USB powered status.
int get_lowbat_state()
Returns low-battery flag.
int get_vbat()
Returns battery voltage.
void qrcode_disp(QRCode *qr, int xo, int yo, int z)
Displays generated QR code.
int qspi_user_size()
Returns size (in bytes) of the user QSPI data area.
uint8_t * qspi_user_addr()
Returns pointer to the user QSPI data area.
int qspi_user_write(uint8_t *data, int size, int offset, int erase)
Writes data to the user QSPI data area.
uint8_t rtc_read_sec()
Reads current second.
void rtc_write(tm_t *tm, dt_t *dt)
Set date and time.
uint8_t rtc_read_century()
Read current century.
void rtc_check_unset()
Check whether RTC was updated from cold start state. Displays set time and set date dialogs if it was...
void rtc_wakeup_delay()
Workaround for CPU bug.
uint8_t rtc_read_min()
Reads current minute.
uint32_t get_rtc_ticks()
Get time ticks (linear time)
void rtc_cancel_alarm()
Cancels any pending RTC alarm.
void rtc_write_century(uint8_t cent)
Write century.
void rtc_set_alarm(tm_t *tm, dt_t *dt)
Plants RTC alarm at given time.
rtc_ticks_stat_t * rtc_update_ticks()
Returns pointer to currently updated RTC ticks structure.
void rtc_update_time_sec(int delta_sec)
Shift time by given amount of seconds.
void rtc_read(tm_t *tm, dt_t *dt)
Read current data and time.
void set_flag_fn_t(int val)
Set flag function prototype.
Definition dmcp.h:1524
set_flag_fn_t * set_flag_clk24
Setter callback for CLK24 flag.
Definition dmcp.h:1556
set_flag_fn_t * set_beep_mute
Setter callback for Beep Mute flag.
Definition dmcp.h:1569
get_flag_fn_t * get_flag_dmy
Getter callback for DMY flag.
Definition dmcp.h:1535
get_flag_fn_t * is_flag_clk24
Getter callback for CLK24 flag.
Definition dmcp.h:1550
int get_flag_fn_t()
Get flag function prototype.
Definition dmcp.h:1523
get_flag_fn_t * is_beep_mute
Getter callback for Beep Mute flag.
Definition dmcp.h:1563
set_flag_fn_t * set_flag_dmy
Setter callback for DMY flag.
Definition dmcp.h:1543
disp_stat_t * t24
Font state for normal system font.
Definition dmcp.h:1656
disp_stat_t * fReg
Font state for user font.
Definition dmcp.h:1663
disp_stat_t * t20
Font state for small system font.
Definition dmcp.h:1649
run_menu_item_fn_t * run_menu_item_app
System callback variable to run menu item (see Menu system for details)
Definition dmcp.h:1623
menu_line_str_fn_t * menu_line_str_app
System callback variable to get menu item string (see Menu system for details)
Definition dmcp.h:1628
int usb_serial_read_line(uint8_t chan_nr, uint8_t *buf, int buflen, uint8_t *is_overflow)
Serial console read line.
void usb_serial_write(uint8_t chan_nr, const char *buf, int len)
Serial console write to channel.
void usb_serial_puts(uint8_t chan_nr, const char *str)
Serial console write string to channel.
int usb_serial_ioctl(int op, int val)
Serial console ioclt.
int is_menu_auto_off()
Check menu auto-off state.
int is_auto_off()
Check auto-off state.
int sys_auto_off_cnt()
Returns remaining auto-off seconds.
void reset_auto_off()
Resets auto-off timer.
char * aux_buf_ptr()
Get pointer to aux memory buffer.
int sys_write_buf_used()
Get 'write-buffer-used' flag.
void sys_clear_write_buf_used()
Clear 'write-buffer-used' flag.
int write_buf_size()
Get write buffer size.
void * write_buf_ptr()
Get pointer to write buffer.
void sys_flashing_finish()
Disable flashing.
int sys_flash_write_block(void *dst_addr, uint8_t *src_buf, uint32_t size)
Write data to flash.
void sys_flashing_init()
Enable flashing.
int sys_flash_erase_block(void *start_addr, uint32_t size)
Flash block erase.
void sys_critical_end()
Leave critical section.
int sys_free_mem()
Query free memory for malloc.
void sys_sleep()
Suspend program until next event.
uint8_t get_hw_id()
Query hardware id.
void sys_critical_start()
Enter critical section.
uint32_t mark_region(uint32_t id)
Mark executed code.
void no_region()
Clear current region.
char * get_reset_state_file()
Get pointer to reset state file.
int is_reset_state_file()
Check for reset state file.
void set_reset_magic(uint32_t value)
Set reset constant.
void set_reset_state_file(const char *str)
Set reset state file to given string.
void sys_reset()
Invoke CPU reset.
int sys_timer_active(int timer_ix)
Check timer running status.
void sys_timer_disable(int timer_ix)
Disables system timer.
int sys_timer_timeout(int timer_ix)
Check for timer timeout.
void sys_timer_start(int timer_ix, uint32_t ms_value)
Starts system timer (non-periodic pooling timer)
uint32_t sys_current_ms()
Get current millisecond.
void sys_delay(uint32_t ms_delay)
Delays program by specified number of milliseconds.
uint32_t sys_tick_count()
Get current tick count.
const char * key_to_alpha_table
Key to alpha translation table.
Definition dmcp.h:1607
uint32_t calc_state
Main calculator state flags.
Definition dmcp.h:1590
void void_fn_t()
General prototype for void function.
Definition dmcp.h:1585
FIL * ppgm_fp
Pointer to file handle provided by system.
Definition dmcp.h:1597
void_fn_t * after_fat_format
This callback function is called by system after FAT disk format (if set)
Definition dmcp.h:1578
void print_clk24_time(char *t, int const sz, tm_t *tm, int disp_sec, int disp_dow)
Formats time according to supplied and system flags.
const char * get_month_shortcut(int month)
Three character shortcut of month name.
const char * get_wday_shortcut(int day)
Three character shortcut of day name.
void print_dmy_date(char *s, int const sz, dt_t *dt, const char *prefix, int shortmon, char sep_arg)
Formats date according to supplied and system flags.
int julian_day(dt_t *d)
Calculates Julian day for given date.
void julian_to_date(int julian_day, dt_t *d)
Calculates date for given Julian day.
FatFs file structure used in file operations.
Definition ff_ifc.h:66
QR code data structure.
Definition qrcode_ifc.h:76
Font display state.
Definition dmcp.h:1039
int8_t xspc
Space between chars.
Definition dmcp.h:1047
int8_t xoffs
X offset for first char on line.
Definition dmcp.h:1048
line_font_t const * f
Current font.
Definition dmcp.h:1040
int16_t y_top_grd
Don't overwrite anything above this LCD y-line.
Definition dmcp.h:1044
const uint8_t * post_offs
Array with character x offsets (optional)
Definition dmcp.h:1064
uint8_t lnfill
Fill whole line before writing line.
Definition dmcp.h:1053
int8_t ya
Lines to fill above the font.
Definition dmcp.h:1045
int8_t yb
Lines to fill below the font.
Definition dmcp.h:1046
uint8_t fixed
Draw in fixed width.
Definition dmcp.h:1050
uint8_t bgfill
Fill background while drawing.
Definition dmcp.h:1052
int16_t x
Current x position.
Definition dmcp.h:1041
uint8_t inv
Draw inverted.
Definition dmcp.h:1051
int16_t ln_offs
Line offset (when displaying by line numbers)
Definition dmcp.h:1043
uint8_t newln
Jump to new line after writing line.
Definition dmcp.h:1054
int16_t y
Current y position.
Definition dmcp.h:1042
Date info structure.
Definition dmcp.h:1422
uint8_t month
Month 1-12.
Definition dmcp.h:1424
uint16_t year
Year.
Definition dmcp.h:1423
uint8_t day
Day 1-31.
Definition dmcp.h:1425
Item selection state.
Definition dmcp.h:2751
char * lnbuf
Line buffer (optional - only app wants to use it for line drawing)
Definition dmcp.h:2767
fis_name_fn_t * fis_name_fn
Name callback.
Definition dmcp.h:2759
list_item_t * fis
List items.
Definition dmcp.h:2758
int8_t top_nr
Item number currently first on LCD.
Definition dmcp.h:2753
isel_disp_line_fn_t * disp_line_fn
Line draw function.
Definition dmcp.h:2766
void * data
Custom data (useful for line draw callback)
Definition dmcp.h:2770
int lnsize
Size of lnbuf.
Definition dmcp.h:2768
int8_t lncnt
Number of LCD lines available.
Definition dmcp.h:2754
const char * title
Screen title.
Definition dmcp.h:2764
int max_items
Maximal number of items.
Definition dmcp.h:2760
int8_t roll_lines
How many lines should remain visible while scrolling up/down.
Definition dmcp.h:2755
char * title2
(Optional) Right part of the title (aligned right)
Definition dmcp.h:2765
void * items
Custom data for items.
Definition dmcp.h:2771
int8_t key
key code, set by engine for ISEL_KEY_PRESSED
Definition dmcp.h:2756
int8_t fnr
Currently selected list item.
Definition dmcp.h:2752
int fcnt
Current item count.
Definition dmcp.h:2761
Font structure.
Definition dmcp.h:1009
uint8_t width
Font width in pixels
Definition dmcp.h:1011
uint8_t char_cnt
Number of characters
Definition dmcp.h:1015
uint8_t first_char
Code of first character
Definition dmcp.h:1014
uint16_t const * offs
Character offsets in data.
Definition dmcp.h:1019
const char * name
Font name
Definition dmcp.h:1010
uint8_t const * data
Font data.
Definition dmcp.h:1018
uint8_t scale_x
Scaling factor in x direction
Definition dmcp.h:1016
uint8_t baseline
Baseline in pixels
Definition dmcp.h:1013
uint8_t scale_y
Scaling factor in y direction
Definition dmcp.h:1017
uint8_t height
Font height in pixels
Definition dmcp.h:1012
RTC ticks state.
Definition dmcp.h:1857
uint32_t sec
seconds in day
Definition dmcp.h:1861
rtc_time_regs_t regs
Time stamp.
Definition dmcp.h:1858
uint32_t jday
julian day
Definition dmcp.h:1860
uint32_t msec
seconds in day corresponding to current minute (for easy sub-minute updates)
Definition dmcp.h:1862
uint64_t dsec
julian day * seconds_per_day
Definition dmcp.h:1859
RTC time stamp parts.
Definition dmcp.h:1847
uint16_t ss
Subsecond part.
Definition dmcp.h:1850
uint32_t tm
Date part.
Definition dmcp.h:1849
uint32_t dt
Time part.
Definition dmcp.h:1848
Single menu screen definition.
Definition dmcp.h:2343
const char *const * msg
Message displayed above menu. NULL = no message.
Definition dmcp.h:2355
const uint8_t * items
Menu items.
Definition dmcp.h:2345
void_fn_t * post_disp
Function called after the menu is drawn to LCD.
Definition dmcp.h:2360
const char * name
Display name of the menu.
Definition dmcp.h:2344
Time info structure.
Definition dmcp.h:1431
uint8_t csec
Centiseconds (1/100s)
Definition dmcp.h:1435
uint8_t dow
Day of week.
Definition dmcp.h:1441
uint8_t min
Minutes.
Definition dmcp.h:1433
uint8_t sec
Seconds.
Definition dmcp.h:1434
uint8_t hour
Hours.
Definition dmcp.h:1432