|
void | rtos_gpio_port_enable (rtos_gpio_t *ctx, rtos_gpio_port_id_t port_id) |
|
uint32_t | rtos_gpio_port_in (rtos_gpio_t *ctx, rtos_gpio_port_id_t port_id) |
|
void | rtos_gpio_port_out (rtos_gpio_t *ctx, rtos_gpio_port_id_t port_id, uint32_t value) |
|
void | rtos_gpio_isr_callback_set (rtos_gpio_t *ctx, rtos_gpio_port_id_t port_id, rtos_gpio_isr_cb_t cb, void *app_data) |
|
void | rtos_gpio_interrupt_enable (rtos_gpio_t *ctx, rtos_gpio_port_id_t port_id) |
|
void | rtos_gpio_interrupt_disable (rtos_gpio_t *ctx, rtos_gpio_port_id_t port_id) |
|
void | rtos_gpio_port_drive (rtos_gpio_t *ctx, rtos_gpio_port_id_t port_id) |
|
void | rtos_gpio_port_drive_low (rtos_gpio_t *ctx, rtos_gpio_port_id_t port_id) |
|
void | rtos_gpio_port_drive_high (rtos_gpio_t *ctx, rtos_gpio_port_id_t port_id) |
|
void | rtos_gpio_port_pull_none (rtos_gpio_t *ctx, rtos_gpio_port_id_t port_id) |
|
void | rtos_gpio_port_pull_up (rtos_gpio_t *ctx, rtos_gpio_port_id_t port_id) |
|
void | rtos_gpio_port_pull_down (rtos_gpio_t *ctx, rtos_gpio_port_id_t port_id) |
|
void | rtos_gpio_write_control_word (rtos_gpio_t *ctx, rtos_gpio_port_id_t port_id, uint32_t value) |
|
The core functions for using an RTOS GPIO driver instance after it has been initialized and started. These functions may be used by both the host and any client tiles that RPC has been enabled for.
◆ rtos_gpio_interrupt_disable()
Disables interrupts on a GPIO port.
- Parameters
-
ctx | A pointer to the GPIO driver instance to use. |
port_id | The GPIO port to disable interrupts on. |
◆ rtos_gpio_interrupt_enable()
Enables interrupts on a GPIO port. Interrupts are triggered whenever the value on the port changes.
- Parameters
-
ctx | A pointer to the GPIO driver instance to use. |
port_id | The GPIO port to enable interrupts on. |
◆ rtos_gpio_isr_callback_set()
Sets the application callback function to be called when there is an interrupt on a GPIO port.
This must be called prior to enabling interrupts on port_id
. It is also safe to be called while interrupts are enabled on it.
- Parameters
-
ctx | A pointer to the GPIO driver instance to use. |
port_id | Interrupts triggered by this port will call the application callback function cb . |
cb | The application callback function to call when there is an interrupt triggered by the port port_id . |
app_data | A pointer to application specific data to pass to the application callback function cb . |
◆ rtos_gpio_port_drive()
Configures a port in drive mode. Output values will be driven on the pins. This is the default drive state of a port. This has the side effect of disabling the port's internal pull-up and pull down resistors.
- Parameters
-
ctx | A pointer to the GPIO driver instance to use. |
port_id | The GPIO port to set to drive mode. |
◆ rtos_gpio_port_drive_high()
Configures a port in drive high mode. When the output value is 1 the pin is driven high, otherwise no value is driven. This has the side effect of enabled the port's internal pull-down resistor.
- Parameters
-
ctx | A pointer to the GPIO driver instance to use. |
port_id | The GPIO port to set to drive mode high. |
◆ rtos_gpio_port_drive_low()
Configures a port in drive low mode. When the output value is 0 the pin is driven low, otherwise no value is driven. This has the side effect of enabled the port's internal pull-up resistor.
- Parameters
-
ctx | A pointer to the GPIO driver instance to use. |
port_id | The GPIO port to set to drive mode low. |
◆ rtos_gpio_port_enable()
Enables a GPIO port. This must be called on a port before using it with any other GPIO driver function.
- Parameters
-
ctx | A pointer to the GPIO driver instance to use. |
port_id | The GPIO port to enable. |
◆ rtos_gpio_port_in()
Inputs the value present on a GPIO port's pins.
- Parameters
-
ctx | A pointer to the GPIO driver instance to use. |
port_id | The GPIO port to read from. |
- Returns
- the value on the port's pins.
◆ rtos_gpio_port_out()
Outputs a value to a GPIO port's pins.
- Parameters
-
ctx | A pointer to the GPIO driver instance to use. |
port_id | The GPIO port to write to. |
value | The value to write to the GPIO port. |
◆ rtos_gpio_port_pull_down()
Enables the port's internal pull-down resistor.
- Parameters
-
ctx | A pointer to the GPIO driver instance to use. |
port_id | The GPIO port to set to pull down mode. |
◆ rtos_gpio_port_pull_none()
Disables the port's internal pull-up and pull down resistors.
- Parameters
-
ctx | A pointer to the GPIO driver instance to use. |
port_id | The GPIO port to set to pull none mode. |
◆ rtos_gpio_port_pull_up()
Enables the port's internal pull-up resistor.
- Parameters
-
ctx | A pointer to the GPIO driver instance to use. |
port_id | The GPIO port to set to pull up mode. |
◆ rtos_gpio_write_control_word()
Configures the port control word value
- Parameters
-
ctx | A pointer to the GPIO driver instance to use. |
port_id | The GPIO port to modify |
value | The value to set the control word to |