ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
nimble_npl_os.h
Go to the documentation of this file.
1
41
42#pragma once
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48#include <stdint.h>
49
50/*
51 * Pull in ThreadX so the struct definitions below have ``TX_MUTEX``
52 * etc. The host unit-test build (``RA8_OFF_TARGET``) does not
53 * cross-link ThreadX -- this file is only compiled into the
54 * cross-target build, so the include is unconditional.
55 */
56#include "tx_api.h"
57
65#define BLE_NPL_OS_ALIGNMENT (4)
66
74#define BLE_NPL_TIME_FOREVER UINT32_MAX
75
77typedef uint32_t ble_npl_time_t;
78
80typedef int32_t ble_npl_stime_t;
81
100 uint8_t queued;
101 ble_npl_event_fn* fn;
102 void* arg;
103};
104
125 TX_QUEUE q;
126 uint8_t storage[64];
127};
128
148 TX_TIMER handle;
151};
152
173
192 TX_SEMAPHORE handle;
193};
194
195#ifdef __cplusplus
196}
197#endif
int32_t ble_npl_stime_t
Signed tick delta, for timeouts expressed relative to now.
uint32_t ble_npl_time_t
Tick-count type used by the NPL.
Opaque mutex stand-in for the host build.
One-shot timer that posts an event into a queue when it fires.
struct ble_npl_event ev
Event posted on each firing.
TX_TIMER handle
Backing ThreadX one-shot timer.
struct ble_npl_eventq * evq
Queue to post the event into.
NimBLE event opaque – pairs a callback with an argument.
ble_npl_event_fn * fn
Callback invoked by ble_npl_event_run.
uint8_t queued
1 while sitting in an evq, 0 otherwise.
void * arg
Opaque user argument passed to fn().
Event queue mapped onto TX_QUEUE.
TX_QUEUE q
Backing ThreadX queue.
uint8_t storage[64]
Backing storage (16 entries * 4 bytes).
Mutex mapped onto TX_MUTEX.
TX_MUTEX handle
Backing ThreadX mutex.
Counting semaphore mapped onto TX_SEMAPHORE.
TX_SEMAPHORE handle
Backing ThreadX counting semaphore.