-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathfujifilm.h
More file actions
67 lines (52 loc) · 1.53 KB
/
Copy pathfujifilm.h
File metadata and controls
67 lines (52 loc) · 1.53 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// TODO: Make fujifilm/task.h, screen.h, ptp.h... (???)
#ifndef FUJI_H
#define FUJI_H
#include <stdint.h>
// Returns current drive (DOS style)
// Crashes without SD card (???)
char fuji_drive();
// Screen text
#define TEXT_BLACK 7
#define TEXT_WHITE 1
// Write ASCII text rows to screen
void fuji_screen_write(char string[], int x, int y, int foreground_color, int background_color);
// Delete text buffer, does not take effect until screen updates
void fuji_discard_text_buffer();
void *fuji_fopen(uint32_t handler, const char string[], int flag);
void *fuji_fwrite(uint32_t handler, void *fp, int n, const void *data);
void *fuji_fread(uint32_t handler, void *fp, int n, const void *data);
void *fuji_fclose(uint32_t handler, void *fp, int x, char *y);
// There is no file pointer, just a single reading state
int fuji_dir_open(char *first, char *second, char *buffer);
int fuji_dir_next(char *buffer);
// Weird OS/timing functions required by file API
void fuji_toggle();
void fuji_zero();
#ifdef MEM_EEP_START
#define GET_EEP(x) ((uint8_t*)MEM_EEP_START)[x]
#define SET_EEP(x, v) ((uint8_t*)MEM_EEP_START)[x] = (uint8_t)v;
#endif
// Task creation data struct
struct FujiTask {
uint32_t a;
char *b;
uint32_t c;
uint32_t d;
void *e;
uint32_t f;
};
int fuji_task_sleep(int ms);
// Seems to just crash the camera
int fuji_create_task(int x, int y, struct FujiTask *task);
struct FujiInputMap {
uint32_t key_code;
uint32_t x;
uint32_t key_status;
int gyro;
int accel;
uint32_t a;
uint32_t b;
uint32_t c;
};
void fuji_init_sqlite();
#endif