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