forked from taisukef/IchigoDot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
matrixled.h
43 lines (35 loc) · 851 Bytes
/
matrixled.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
/*
matrixled
*/
#ifndef _MATRIXLED
#define _MATRIXLED
// フレームの全体長
#define LEN_DATA 1024
// フレーム総数
#define N_FRAME ((LEN_DATA - 8) / 10)
// ^ ^ struct Frameの大きさ
// | save_tagの大きさ
// 1画面分のデータ
struct Frame {
char frame[8];
short waitms;
};
// Saveデータ全体 識別フラグ付き
struct Save_data {
char header[8];
struct Frame frame[N_FRAME];
};
void matrixled_init();
void matrixled_on(int x, int y);
void matrixled_off();
void matrixled_tick();
void get_matrix(char* data);
void set_matrix(const char* data);
void put_matrix(const char* s, int dx, int dy, int dw, int dh);
void PSET(int x, int y);
void PRESET(int x, int y);
void CLS(int n);
void FILL(const char *hex_string);
void FLUSH();
extern short g_rotate;
#endif