software_APIs  1.0.0
mgmt_gpio.h
Go to the documentation of this file.
1 
4 #ifndef MGMT_GPIO_C_HEADER_FILE
5 #define MGMT_GPIO_C_HEADER_FILE
6 
7 // management GPIO
13  reg_gpio_mode1 = 1;
14  reg_gpio_mode0 = 0; // for full swing
15  #ifndef REG_GPIO_INVERTED
16  reg_gpio_ien = 1;
17  reg_gpio_oe = 0;
18  #else
19  reg_gpio_ien = 0; // because in gf the GPIO enable regs are inverted
20  reg_gpio_oe = 1;
21  #endif
22  dummyDelay(1);
23 }
29  reg_gpio_mode1 = 1;
30  reg_gpio_mode0 = 0; // for full swing
31  #ifndef REG_GPIO_INVERTED
32  reg_gpio_ien = 0;
33  reg_gpio_oe = 1;
34  #else
35  reg_gpio_ien = 1; // because in gf the GPIO enable regs are inverted
36  reg_gpio_oe = 0;
37  #endif
38  dummyDelay(1);
39 }
45  reg_gpio_mode1 = 1;
46  reg_gpio_mode0 = 0; // for full swing
47  #ifndef REG_GPIO_INVERTED
48  reg_gpio_ien = 1;
49  reg_gpio_oe = 1;
50  #else
51  reg_gpio_ien = 0; // because in gf the GPIO enable regs are inverted
52  reg_gpio_oe = 0;
53  #endif
54 }
61  reg_gpio_mode1 = 1;
62  reg_gpio_mode0 = 0; // for full swing
63  #ifndef REG_GPIO_INVERTED
64  reg_gpio_ien = 0;
65  reg_gpio_oe = 0;
66  #else
67  reg_gpio_ien = 1; // because in gf the GPIO enable regs are inverted
68  reg_gpio_oe = 1;
69  #endif
70 }
80 void ManagmentGpio_write(bool data){reg_gpio_out = data;}
89 int ManagmentGpio_read(){return reg_gpio_in;}
99 void ManagmentGpio_wait(bool data){while (reg_gpio_in == data);}
100 
101 
102 #endif // MGMT_GPIO_C_HEADER_FILE
int ManagmentGpio_read()
Definition: mgmt_gpio.h:89
void dummyDelay(int num)
Definition: common.h:115
void ManagmentGpio_write(bool data)
Definition: mgmt_gpio.h:80
void ManagmentGpio_ioEnable()
Definition: mgmt_gpio.h:44
void ManagmentGpio_wait(bool data)
Definition: mgmt_gpio.h:99
void ManagmentGpio_outputEnable()
Definition: mgmt_gpio.h:28
void ManagmentGpio_inputEnable()
Definition: mgmt_gpio.h:12
void ManagmentGpio_disable()
Definition: mgmt_gpio.h:60