-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathzx_file_img.h
44 lines (31 loc) · 1.04 KB
/
zx_file_img.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// holmatic
// Creation of ZX file images with dynamic content
#ifndef _ZX_FILE_IMG_H_
#define _ZX_FILE_IMG_H_
#include "esp_err.h"
#include <esp_types.h>
#include "esp_attr.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
ZXFI_LOADER , /*!< initial loader */
ZXFI_MENU_KEY , /*!< shows menu and responds on keypress */
ZXFI_STR_INP, /*!< input string */
ZXFI_NUM
} zxfimg_prog_t;
// call once at startup
void zxfimg_create(zxfimg_prog_t prog_type);
void zxfimg_print_video(uint8_t linenum, const char* asciitxt);
void zxfimg_cpzx_video(uint8_t linenum, const uint8_t* zxstr, uint16_t len);
void zxfimg_set_img(uint16_t filepos,uint8_t data);
uint8_t zxfimg_get_img(uint16_t filepos);
uint16_t zxfimg_get_size();
void zxfimg_delete();
uint16_t convert_ascii_to_zx_str(const char* ascii_str); // return length
uint8_t convert_ascii_to_zx_code(int ascii_char);
void zx_string_to_ascii(const uint8_t* zxstr, size_t len, char* buf_for_ascii);
#ifdef __cplusplus
}
#endif
#endif /* _ZX_FILE_IMG_H_ */