![]()  | 
 mikroSDK Reference Manual
 
 | 
GPIO Port Driver API Reference. More...
Macros | |
| #define | port_read port_read_output | 
| Read from port. More... | |
Functions list | |
| err_t | port_init (port_t *port, port_name_t name, port_size_t mask, pin_direction_t direction) | 
| Initialize GPIO port. More... | |
| err_t | port_write (port_t *port, port_size_t value) | 
| Write to port. More... | |
| port_size_t | port_read_input (port_t *port) | 
| Read from port. More... | |
| port_size_t | port_read_output (port_t *port) | 
| Read from port. More... | |
Driver for configuring GPIO ports as digital output/input and setting/reading logical value.
| #define port_read port_read_output | 
Reads from beforehand initialized port.
| [in] | port | Port driver context structure. See port_t structure definition for detailed explanation. | 
port structure has been declared and initialized beforehand. See port_t structure definition and port_init for detailed explanation.Example
| err_t port_init | ( | port_t * | port, | 
| port_name_t | name, | ||
| port_size_t | mask, | ||
| pin_direction_t | direction | ||
| ) | 
Initializes port driver context structure and masked GPIO pins as digital output or digital input.
| [in,out] | port | Port driver context structure. See port_t structure definition for detailed explanation. | 
| [in] | name | Port name. See port_name_t structure definition for detailed explanation. | 
| [in] | mask | GPIO pin mask. See port_size_t structure definition for detailed explanation. | 
| [in] | direction | GPIO pin direction. See pin_direction_t structure definition for detailed explanation. | 
port structure has been declared. See port_t structure definition for detailed explanation. Example
| err_t port_write | ( | port_t * | port, | 
| port_size_t | value | ||
| ) | 
Writes value to beforehand initialized port. 
| [in] | port | Port driver context structure. See port_t structure definition for detailed explanation. | 
| [in] | value | Bit map to write on port. See port_size_t structure definition for detailed explanation. | 
port structure has been declared and initialized beforehand. See port_t structure definition and port_init for detailed explanation.Example
| port_size_t port_read_input | ( | port_t * | port | ) | 
Reads from beforehand initialized port.
| [in] | port | Port driver context structure. See port_t structure definition for detailed explanation. | 
port structure has been declared and initialized beforehand. See port_t structure definition and port_init for detailed explanation.Example
| port_size_t port_read_output | ( | port_t * | port | ) | 
Reads from beforehand initialized port.
| [in] | port | Port driver context structure. See port_t structure definition for detailed explanation. | 
port structure has been declared and initialized beforehand. See port_t structure definition and port_init for detailed explanation.Example