nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
hpf_gpio.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef HPF_GPIO_H
8#define HPF_GPIO_H
9
10#include <nrfx.h>
11#include <hpf/hpf_common.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
18typedef enum {
19 HPF_GPIO_PIN_CONFIGURE = 0, /* Configure eGPIO pin. */
20 HPF_GPIO_PIN_CLEAR = 1, /* Clear eGPIO pin. */
21 HPF_GPIO_PIN_SET = 2, /* Set eGPIO pin. */
22 HPF_GPIO_PIN_TOGGLE = 3, /* Toggle eGPIO pin. */
23 HPF_GPIO_PORT_SET_MASKED = 4, /* Atomically update selected eGPIO pins. */
25
27typedef struct __packed {
28 uint8_t opcode; /* eGPIO opcode. */
29 uint32_t pin; /* Pin number when opcode is HPF_GPIO_PIN_CONFIGURE, pin mask otherwise. */
30 uint8_t port; /* Port number. */
31 uint32_t flags; /* Configuration flags when opcode
32 * is HPF_GPIO_PIN_CONFIGURE (gpio_flags_t).
33 * Raw pin value when opcode is HPF_GPIO_PORT_SET_MASKED.
34 * Not used in other cases.
35 */
37
42
43#ifdef __cplusplus
44}
45#endif
46
47#endif /* HPF_GPIO_H */
hpf_gpio_opcode_t
eGPIO opcodes.
Definition hpf_gpio.h:18
@ HPF_GPIO_PIN_CLEAR
Definition hpf_gpio.h:20
@ HPF_GPIO_PORT_SET_MASKED
Definition hpf_gpio.h:23
@ HPF_GPIO_PIN_SET
Definition hpf_gpio.h:21
@ HPF_GPIO_PIN_CONFIGURE
Definition hpf_gpio.h:19
@ HPF_GPIO_PIN_TOGGLE
Definition hpf_gpio.h:22
uint8_t opcode
Definition hpf_gpio.h:28
uint32_t pin
Definition hpf_gpio.h:29
uint32_t flags
Definition hpf_gpio.h:31
uint8_t port
Definition hpf_gpio.h:30
eGPIO data packet.
Definition hpf_gpio.h:27
hpf_gpio_data_packet_t data
Definition hpf_gpio.h:40
Definition hpf_gpio.h:38
Definition hpf_common.h:23