diff options
author | Alejandro Mery <amery@geeks.cl> | 2012-05-04 17:33:06 +0400 |
---|---|---|
committer | Alejandro Mery <amery@geeks.cl> | 2012-05-04 17:33:06 +0400 |
commit | 8368bee12de186be27962903dfb675d1ec95f25a (patch) | |
tree | 823b45cb55de3e7b22af95fdee08301dc9302526 /script.h | |
parent | c62b4603e4705d042b0a34eb97d5e2188f2694f6 (diff) |
script: implement script_gpio_entry_append()
Diffstat (limited to 'script.h')
-rw-r--r-- | script.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -67,6 +67,14 @@ struct script_string_entry { char string[]; }; +/** entry describing a GPIO */ +struct script_gpio_entry { + struct script_entry entry; + + unsigned port, port_num; + unsigned data[4]; +}; + /** create a new script tree */ struct script *script_new(void); /** deletes a tree recursively */ @@ -92,5 +100,10 @@ struct script_single_entry *script_single_entry_append(struct script *script, struct script_string_entry *script_string_entry_append(struct script *script, const char *name, size_t l, const char *s); +/** create a new GPIO entry appended to the last section of a tree */ +struct script_gpio_entry *script_gpio_entry_append(struct script *script, + const char *name, + unsigned port, unsigned num, + unsigned data[4]); #endif |