1 2 #ifndef __SCRIPT_H__ 3 #define __SCRIPT_H__ 4 5 struct script_gpio_set 6 { 7 char name[32]; 8 int port; 9 int port_num; 10 int mul_sel; 11 int pull; 12 int drv_level; 13 int data; 14 }; 15 16 /* 17 * init script. called before other function. 18 * \param shmid. 19 */ 20 int init_script(char* shmid); 21 22 /* 23 * deinit script. 24 */ 25 void deinit_script(void); 26 27 /* 28 * get the number of main key in script. 29 */ 30 int script_mainkey_cnt(void); 31 32 /* 33 * get the name of specified index main key. 34 */ 35 int script_mainkey_name(int idx, char *name); 36 37 /* 38 * fetch word, string, gpio from script. 39 */ 40 int script_fetch(char *main_name, char *sub_name, int value[], int count); 41 42 /* 43 * fetch gpio set from script. 44 */ 45 int script_fetch_gpio_set(char *main_name, struct script_gpio_set *gpio_set, 46 int gpio_cnt); 47 48 49 #endif /* __SCRIPT_H__ */ 50