Commit a14b0a7a authored by Alejandro Mery's avatar Alejandro Mery
Browse files

script_bin: move bin structs from script.h to script_bin.h

parent 0fd1bc10
...@@ -75,37 +75,6 @@ struct script_gpio_entry { ...@@ -75,37 +75,6 @@ struct script_gpio_entry {
int32_t data[4]; int32_t data[4];
}; };
/** binary representation of the head of a section */
struct script_bin_section {
char name[32];
int32_t length;
int32_t offset;
};
/** binary representation of the head of the script file */
struct script_bin_head {
int32_t sections;
int32_t version[3];
struct script_bin_section section[];
};
/** binary representation of the head of an entry */
struct script_bin_entry {
char name[32];
int32_t offset;
int32_t pattern;
};
/** binary representation of a GPIO */
struct script_bin_gpio_value {
int32_t port;
int32_t port_num;
int32_t mul_sel;
int32_t pull;
int32_t drv_level;
int32_t data;
};
/** create a new script tree */ /** create a new script tree */
struct script *script_new(void); struct script *script_new(void);
/** deletes a tree recursively */ /** deletes a tree recursively */
......
...@@ -17,6 +17,37 @@ ...@@ -17,6 +17,37 @@
#ifndef _SUBXI_TOOLS_SCRIPT_BIN_H #ifndef _SUBXI_TOOLS_SCRIPT_BIN_H
#define _SUBXI_TOOLS_SCRIPT_BIN_H #define _SUBXI_TOOLS_SCRIPT_BIN_H
/** binary representation of the head of a section */
struct script_bin_section {
char name[32];
int32_t length;
int32_t offset;
};
/** binary representation of the head of the script file */
struct script_bin_head {
int32_t sections;
int32_t version[3];
struct script_bin_section section[];
};
/** binary representation of the head of an entry */
struct script_bin_entry {
char name[32];
int32_t offset;
int32_t pattern;
};
/** binary representation of a GPIO */
struct script_bin_gpio_value {
int32_t port;
int32_t port_num;
int32_t mul_sel;
int32_t pull;
int32_t drv_level;
int32_t data;
};
size_t script_bin_size(struct script *script, size_t script_bin_size(struct script *script,
size_t *sections, size_t *entries); size_t *sections, size_t *entries);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment