Skip to content

Commit a14b0a7

Browse files
committed
script_bin: move bin structs from script.h to script_bin.h
1 parent 0fd1bc1 commit a14b0a7

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

script.h

-31
Original file line numberDiff line numberDiff line change
@@ -75,37 +75,6 @@ struct script_gpio_entry {
7575
int32_t data[4];
7676
};
7777

78-
/** binary representation of the head of a section */
79-
struct script_bin_section {
80-
char name[32];
81-
int32_t length;
82-
int32_t offset;
83-
};
84-
85-
/** binary representation of the head of the script file */
86-
struct script_bin_head {
87-
int32_t sections;
88-
int32_t version[3];
89-
struct script_bin_section section[];
90-
};
91-
92-
/** binary representation of the head of an entry */
93-
struct script_bin_entry {
94-
char name[32];
95-
int32_t offset;
96-
int32_t pattern;
97-
};
98-
99-
/** binary representation of a GPIO */
100-
struct script_bin_gpio_value {
101-
int32_t port;
102-
int32_t port_num;
103-
int32_t mul_sel;
104-
int32_t pull;
105-
int32_t drv_level;
106-
int32_t data;
107-
};
108-
10978
/** create a new script tree */
11079
struct script *script_new(void);
11180
/** deletes a tree recursively */

script_bin.h

+31
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,37 @@
1717
#ifndef _SUBXI_TOOLS_SCRIPT_BIN_H
1818
#define _SUBXI_TOOLS_SCRIPT_BIN_H
1919

20+
/** binary representation of the head of a section */
21+
struct script_bin_section {
22+
char name[32];
23+
int32_t length;
24+
int32_t offset;
25+
};
26+
27+
/** binary representation of the head of the script file */
28+
struct script_bin_head {
29+
int32_t sections;
30+
int32_t version[3];
31+
struct script_bin_section section[];
32+
};
33+
34+
/** binary representation of the head of an entry */
35+
struct script_bin_entry {
36+
char name[32];
37+
int32_t offset;
38+
int32_t pattern;
39+
};
40+
41+
/** binary representation of a GPIO */
42+
struct script_bin_gpio_value {
43+
int32_t port;
44+
int32_t port_num;
45+
int32_t mul_sel;
46+
int32_t pull;
47+
int32_t drv_level;
48+
int32_t data;
49+
};
50+
2051
size_t script_bin_size(struct script *script,
2152
size_t *sections, size_t *entries);
2253

0 commit comments

Comments
 (0)