oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
hal_gpio.h
1/*
2 * Copyright (C) 2026 Kamil Lulko <kamil.lulko@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 *
6 * This file is part of oveRTOS.
7 */
8
9#ifndef OVE_HAL_GPIO_H
10#define OVE_HAL_GPIO_H
11
25#include "ove/gpio.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
41int ove_hal_gpio_set(unsigned int port, unsigned int pin, int value);
42
52int ove_hal_gpio_get(unsigned int port, unsigned int pin);
53
64int ove_hal_gpio_configure(unsigned int port, unsigned int pin,
65 ove_gpio_mode_t mode);
66
81int ove_hal_gpio_irq_hw_enable(unsigned int port, unsigned int pin,
83 ove_gpio_irq_cb callback,
84 void *user_data);
85
96int ove_hal_gpio_irq_hw_disable(unsigned int port, unsigned int pin);
97
98#ifdef __cplusplus
99}
100#endif
101
104#endif /* OVE_HAL_GPIO_H */
void(* ove_gpio_irq_cb)(unsigned int port, unsigned int pin, void *user_data)
GPIO interrupt callback type (re-exported for BSP-only callers).
Definition bsp.h:61
ove_gpio_irq_mode_t
GPIO interrupt trigger edge selection (re-exported for BSP-only callers).
Definition bsp.h:48
ove_gpio_mode_t
GPIO pin direction and drive mode.
Definition gpio.h:35
int ove_hal_gpio_configure(unsigned int port, unsigned int pin, ove_gpio_mode_t mode)
Configure the direction and drive mode of a GPIO pin at the hardware level.
int ove_hal_gpio_irq_hw_enable(unsigned int port, unsigned int pin, ove_gpio_irq_mode_t mode, ove_gpio_irq_cb callback, void *user_data)
Program and enable a GPIO interrupt in hardware.
int ove_hal_gpio_irq_hw_disable(unsigned int port, unsigned int pin)
Disable a GPIO interrupt in hardware without unregistering the callback.
int ove_hal_gpio_set(unsigned int port, unsigned int pin, int value)
Set the output level of a GPIO pin at the hardware level.
int ove_hal_gpio_get(unsigned int port, unsigned int pin)
Read the current logical level of a GPIO pin at the hardware level.