-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathframe-v9.c
More file actions
104 lines (103 loc) · 3.46 KB
/
frame-v9.c
File metadata and controls
104 lines (103 loc) · 3.46 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#if defined(QRCODEVERSION) && QRCODEVERSION == 9
const unsigned char neccblk1 = 2;
const unsigned char neccblk2 = 0;
const unsigned char datablkw = 116;
const unsigned char eccblkwid = 30;
const unsigned char VERSION = 9;
const unsigned char ECCLEVEL = 1;
const unsigned char WD = 53;
const unsigned char WDB = 7;
unsigned char strinbuf[371];
unsigned char qrframe[600];
unsigned char rlens[54];
#ifndef __AVR__
#define PROGMEM
#define memcpy_P memcpy
#define __LPM(x) *x
#else
#include <avr/pgmspace.h>
#endif
const unsigned char framebase[] PROGMEM = {
0xfe,0x00,0x00,0x00,0x00,0x23,0xf8,
0x82,0x00,0x00,0x00,0x00,0x32,0x08,
0xba,0x00,0x00,0x00,0x00,0x12,0xe8,
0xba,0x00,0x00,0x00,0x00,0x2a,0xe8,
0xba,0x00,0x00,0xf8,0x00,0x22,0xe8,
0x82,0x00,0x00,0x88,0x00,0x22,0x08,
0xfe,0xaa,0xaa,0xaa,0xaa,0xab,0xf8,
0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0x02,0x00,0x00,0xf8,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x0f,0x80,0x00,0xf8,0x00,0x0f,0x80,
0x08,0x80,0x00,0x88,0x00,0x08,0x80,
0x0a,0x80,0x00,0xa8,0x00,0x0a,0x80,
0x08,0x80,0x00,0x88,0x00,0x08,0x80,
0x0f,0x80,0x00,0xf8,0x00,0x0f,0x80,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xde,0x00,0x00,0x00,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x00,0x00,0x00,
0x12,0x00,0x00,0xf8,0x00,0x0f,0x80,
0x00,0x80,0x00,0x88,0x00,0x08,0x80,
0xfe,0x00,0x00,0xa8,0x00,0x0a,0x80,
0x82,0x00,0x00,0x88,0x00,0x08,0x80,
0xba,0x00,0x00,0xf8,0x00,0x0f,0x80,
0xba,0x00,0x00,0x00,0x00,0x00,0x00,
0xba,0x00,0x00,0x00,0x00,0x00,0x00,
0x82,0x00,0x00,0x00,0x00,0x00,0x00,
0xfe,0x00,0x00,0x00,0x00,0x00,0x00,
};
const unsigned char framask[] PROGMEM = {
0xff,0xff,0xff,0xff,0xff,0xf8,0x10,
0x04,0x00,0x80,0x08,0x00,0x40,0x01,
0x00,0x02,0x00,0x02,0x00,0x01,0x00,
0x00,0x40,0x00,0x08,0x00,0x00,0x80,
0x00,0x04,0x00,0x00,0x10,0x00,0x00,
0x20,0x00,0x00,0xf8,0x00,0x08,0x7c,
0x00,0x06,0x1f,0x00,0x01,0xc3,0xe0,
0x00,0x3c,0x3e,0x00,0x03,0xe0,0x40,
0x00,0x00,0x01,0x00,0x00,0x00,0x02,
0x00,0x00,0x00,0x02,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,0x00,0x40,0x00,
0x00,0x00,0x08,0x00,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x04,0x00,0x00,
0x00,0x00,0x10,0x00,0x00,0x00,0x00,
0x20,0x00,0x00,0x00,0x00,0x20,0x00,
0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x01,0xfc,0x00,0x00,0x00,0x00,0x3f,
0x80,0x00,0x00,0x00,0x03,0xf8,0x00,
0x03,0xe0,0x00,0x3f,0xf0,0x00,0x1f,
0x00,0x01,0xff,0xc0,0x00,0x7c,0x00,
0x07,0xff,0x80,0x00,0xf8,0x00,0x0f,
0xff,0x80,0x00,0xf8,0x00,0x0f,0xff,
0xc0,0x00,0x00,0x00,0x00,0x1f,0xf0,
0x00,0x00,0x00,0x00,0x03,0xfe,0x00,
0x00,0x00,0x00,0x00,0x3f,0xe0,0x00,
0x00,0x00,0x00,0x00,
};
#endif