63 for (
int i = 0; i < elem; i++) {
64 current_entry = current_entry->
next;
74 "Due to limitations of the filesystem",
75 "implementation you can only write to",
78 "The files need to have a .bmp",
79 "extension and must be at least",
80 "189410 bytes (185kb) large.",
81 "Unfortunately there were no such",
82 "files found in the root directory.",
84 "Please create some files and come",
94 0x42, 0x4d, 0xe2, 0xe3, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7a, 0x00,
95 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x3e, 0x01, 0x00, 0x00, 0xc6, 0x00,
96 0x00, 0x00, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0xe3,
97 0x02, 0x00, 0x13, 0x0b, 0x00, 0x00, 0x13, 0x0b, 0x00, 0x00, 0x00, 0x00,
98 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x47, 0x52, 0x73, 0x00, 0x00,
99 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
100 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
101 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
102 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
103 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
123 b_back.
text =
"Back";
149 for (
int i = 0; i < dir->
num_files; i++) {
158 if (file->
fsize < 189410) {
214 if (file->
fsize < 189410) {
220 TRANSPARENT, 0,
"%-16s %02u.%02u.%02u %02u:%02u:%02u %u",
230 if (current_entry == NULL) {
232 files_ok = current_entry;
235 current_entry = current_entry->
next;
238 current_entry->
next = NULL;
322 while (current_entry != NULL) {
324 free((
void*)(current_entry->
filename));
326 current_entry = temp;
uint8_t tft_font_height(uint8_t fontnum)
bool touch_register_area(TOUCH_AREA_STRUCT *area)
static unsigned char bmpheader_data[0x7A]
const char * text
The label of the button.
uint16_t txtcolor
The 16-bit text color.
FILE_STATUS filesystem_file_seek(FILE_HANDLE *handle, uint32_t offset)
Receive an event when the pen goes up inside the region.
unsigned sec
second/2 (0..29)
SCREEN_STRUCT * get_screen_photomodesave()
uint16_t y1
Top Left Y-Coordinate of Area.
void tft_print_formatted(uint16_t x, uint16_t y, uint16_t color, uint16_t bgcolor, uint8_t font, const char *format,...)
uint16_t y
The Y-Coordinate of the point.
void tft_print_line(uint16_t x, uint16_t y, uint16_t color, uint16_t bgcolor, uint8_t font, const char *text)
FILE_DATE_STRUCT fdate
Last modified date.
uint8_t fattrib
File/Directory Attributes.
uint16_t x1
Top Left X-Coordinate of Area.
static void b_back_cb(void *button)
int pixy_save_full_frame(FILE_HANDLE *handle)
uint16_t bgcolor
The 16-bit background color of the button.
TOUCH_AREA_STRUCT base
Basic geometry of the button. You only need to set the x1, y1, x2, y2 members of this struct...
static TOUCH_AREA_STRUCT a_area
void touch_unregister_area(TOUCH_AREA_STRUCT *area)
uint16_t y2
Bottom Right Y-Coordinate of Area.
struct FILE_LIST_ENTRY_S FILE_LIST_ENTRY
FILE_HANDLE * filesystem_file_open(const char *filename)
void filesystem_file_close(FILE_HANDLE *handle)
TOUCH_CALLBACK callback
Callback which is executed when an event occurred in this Area.
File has the archive flag set (probably unused)
char * fname
File/Directory name.
void tft_clear(uint16_t color)
static BUTTON_STRUCT b_back
uint16_t x2
Bottom Right X-Coordinate of Area.
unsigned year
year from 1980 (0..127)
uint16_t num_files
Number of files/directories in this directory.
unsigned month
month (1..12)
FILE_STATUS filesystem_file_write(FILE_HANDLE *handle, uint8_t *buf, uint32_t size)
unsigned min
minute (0..59
POINT_STRUCT touch_get_last_point()
static SCREEN_STRUCT screen
struct FILE_LIST_ENTRY_S * next
unsigned hour
hour (0..23)
TOUCH_ACTION hookedActions
Actions to listen to.
static void update(void *screen)
FILE_STRUCT * files
An array with num_files FILE_STRUCT entries.
DIRECTORY_STRUCT * filesystem_dir_open(const char *path)
static void enter(void *screen)
It's a directory and not a file.
static FILE_LIST_ENTRY * files_ok
File is readonly. You cannot write to it.
static void leave(void *screen)
BUTTON_CALLBACK callback
Callback which is executed when the button is pressed.
static void touchCB(void *touchArea, TOUCH_ACTION triggeredAction)
static const char * picked_file
uint8_t font
The number of the font to use.
static const char * nomatch_text[]
void filesystem_dir_close(DIRECTORY_STRUCT *dir)
FILE_TIME_STRUCT ftime
Last modified time.
uint32_t fsize
File size in bytes. 0 for directories.