Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
common.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 Embeint Holdings Pty Ltd
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#include <stdint.h>
8
9#include <zephyr/kernel.h>
10#include <zephyr/drivers/gpio.h>
11#include <zephyr/modem/pipe.h>
12#include <zephyr/sys/ring_buffer.h>
13
15 /* Pointer to data ready pin configuration */
16 const struct gpio_dt_spec *data_ready;
17 /* Communication pipe */
18 struct modem_pipe pipe;
19 /* Ring buffer for holding pipe data stream */
20 struct ring_buf pipe_ring_buf;
21 /* Worker that reads the FIFO */
22 struct k_work_delayable fifo_read;
23 /* Signal to notify when FIFO read completes */
24 struct k_poll_signal read_result;
25 /* Callback for data ready GPIO */
26 struct gpio_callback data_ready_cb;
27 /* Bus (RTIO SQE) contention semaphore */
28 struct k_sem bus_sem;
29 /* Duration between polls */
30 k_timeout_t poll_period;
31 /* Number of bytes pending on FIFO */
32 uint16_t bytes_pending;
33 /* Internal state flags */
34 uint8_t flags;
35 /* Backing memory for pipe data stream */
36 uint8_t pipe_memory[CONFIG_GNSS_U_BLOX_PIPE_SIZE];
37};
Definition common.h:14
struct modem_pipe pipe
Definition common.h:18
struct k_poll_signal read_result
Definition common.h:24
uint8_t pipe_memory[CONFIG_GNSS_U_BLOX_PIPE_SIZE]
Definition common.h:36
struct k_work_delayable fifo_read
Definition common.h:22
uint8_t flags
Definition common.h:34
struct ring_buf pipe_ring_buf
Definition common.h:20
uint16_t bytes_pending
Definition common.h:32
struct k_sem bus_sem
Definition common.h:28
struct gpio_callback data_ready_cb
Definition common.h:26
const struct gpio_dt_spec * data_ready
Definition common.h:16
k_timeout_t poll_period
Definition common.h:30