Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
25e78f0c
Commit
25e78f0c
authored
May 06, 2012
by
Alejandro Mery
Browse files
script: moved script_bin_* structs from bin2fex.h to script.h
parent
85d240fa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
25e78f0c
...
@@ -14,6 +14,7 @@ clean:
...
@@ -14,6 +14,7 @@ clean:
$(TOOLS)
:
Makefile sunxi-tools.h
$(TOOLS)
:
Makefile sunxi-tools.h
fex2bin
:
script.c script.h
fex2bin
:
script.c script.h
bin2fex
:
script.h
%
:
%.c %.h
%
:
%.c %.h
$(CC)
$(CFLAGS)
$(LDFLAGS)
-o
$@
$(
filter
%.c,
$^
)
$(LIBS)
$(CC)
$(CFLAGS)
$(LDFLAGS)
-o
$@
$(
filter
%.c,
$^
)
$(LIBS)
...
...
bin2fex.h
View file @
25e78f0c
...
@@ -18,39 +18,6 @@
...
@@ -18,39 +18,6 @@
#define _SUNXI_TOOLS_BIN2FEX_H
#define _SUNXI_TOOLS_BIN2FEX_H
#include <stdint.h>
#include <stdint.h>
#include "script.h"
struct
script_bin_section
{
char
name
[
32
];
int32_t
length
;
int32_t
offset
;
};
struct
script_bin_head
{
int32_t
sections
;
int32_t
version
[
3
];
struct
script_bin_section
section
[];
};
struct
script_bin_entry
{
char
name
[
32
];
int32_t
offset
;
int32_t
pattern
;
};
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
;
};
enum
script_value_type
{
SCRIPT_VALUE_TYPE_SINGLE_WORD
=
1
,
SCRIPT_VALUE_TYPE_STRING
,
SCRIPT_VALUE_TYPE_MULTI_WORD
,
SCRIPT_VALUE_TYPE_GPIO
,
SCRIPT_VALUE_TYPE_NULL
,
};
#endif
#endif
script.h
View file @
25e78f0c
...
@@ -75,6 +75,37 @@ struct script_gpio_entry {
...
@@ -75,6 +75,37 @@ 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 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment