![]() |
mikroSDK Reference Manual
|
Digital Input Pin Driver API Reference. More...
Functions list | |
| err_t | digital_in_init (digital_in_t *in, pin_name_t name) |
| Initialize GPIO pin. More... | |
| uint8_t | digital_in_read (digital_in_t *in) |
| Read GPIO pin. More... | |
This driver provids functions for configuring GPIO pin as digital input and reading logical value from it.
| err_t digital_in_init | ( | digital_in_t * | in, |
| pin_name_t | name | ||
| ) |
Initializes digital input driver context structure and individual GPIO pin as digital input.
| [in,out] | in | Digital input driver context structure. See digital_in_t structure definition for detailed explanation. |
| [in] | name | The name of the GPIO pin. See pin_name_t structure definition for detailed explanation. |
in structure has been declared. See digital_in_err_t structure definition for detailed explanation. Example
| uint8_t digital_in_read | ( | digital_in_t * | in | ) |
Reads the current input value of the individual GPIO pin.
| [in] | in | Digital input driver context structure. See digital_in_t structure definition for detailed explanation. |
in structure has been declared and initialized beforehand. See digital_in_t structure definition and digital_in_init for detailed explanation. Example