![]() |
mikroSDK Reference Manual
|
Digital Output Pin Driver API Reference. More...
Functions list | |
| err_t | digital_out_init (digital_out_t *out, pin_name_t name) |
| Initialize GPIO pin. More... | |
| err_t | digital_out_high (digital_out_t *out) |
| Set pin state to logical high. More... | |
| err_t | digital_out_low (digital_out_t *out) |
| Set pin state to logical low. More... | |
| err_t | digital_out_toggle (digital_out_t *out) |
| Toggle pin state. More... | |
| err_t | digital_out_write (digital_out_t *out, uint8_t value) |
| Set pin state. More... | |
This driver provids functions for configuring GPIO pin as digital output and setting logical value to it.
| err_t digital_out_init | ( | digital_out_t * | out, |
| pin_name_t | name | ||
| ) |
Initializes digital output driver context structure and individual GPIO pin as digital output.
| [in,out] | out | Digital output driver context structure. See digital_out_t structure definition for detailed explanation. |
| [in] | name | The name of the GPIO pin. See pin_name_t structure definition for detailed explanation. |
out structure has been declared. See digital_out_t structure definition for detailed explanation. Example
| err_t digital_out_high | ( | digital_out_t * | out | ) |
Sets digital output individual pin out->pin to logic 1.
| [in] | out | Digital output driver context structure. See digital_out_t structure definition for detailed explanation. |
out structure has been declared and initialized beforehand. See digital_out_t structure definition and digital_out_init for detailed explanation.Example
| err_t digital_out_low | ( | digital_out_t * | out | ) |
Sets digital output individual pin out->pin to logic 0.
| [in] | out | Digital output driver context structure. See digital_out_t structure definition for detailed explanation. |
out structure has been declared and initialized beforehand. See digital_out_t structure definition and digital_out_init for detailed explanation.Example
| err_t digital_out_toggle | ( | digital_out_t * | out | ) |
Toggles digital output individual pin out->pin logic state.
| [in] | out | Digital output driver context structure. See digital_out_t structure definition for detailed explanation. |
out structure has been declared and initialized beforehand. See digital_out_t structure definition and digital_out_init for detailed explanation.Example
| err_t digital_out_write | ( | digital_out_t * | out, |
| uint8_t | value | ||
| ) |
Sets digital output individual pin out->pin to logic state declared by value .
| [in] | out | Digital output driver context structure. See digital_out_t structure definition for detailed explanation. |
| [in] | value | Logic value to write. |
out structure has been declared and initialized beforehand. See digital_out_t structure definition and digital_out_init for detailed explanation.Example