Zephyr Project API 4.5.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
lora_fake.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2026 Embeint Inc
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12
13#ifndef ZEPHYR_INCLUDE_DRIVERS_LORA_LORA_FAKE_H_
14#define ZEPHYR_INCLUDE_DRIVERS_LORA_LORA_FAKE_H_
15
16#include <zephyr/drivers/lora.h>
17#include <zephyr/fff.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
39
41DECLARE_FAKE_VALUE_FUNC(int, fake_lora_config, const struct device *,
42 const struct lora_modem_config *);
43
45DECLARE_FAKE_VALUE_FUNC(uint32_t, fake_lora_airtime, const struct device *, uint32_t);
46
48DECLARE_FAKE_VALUE_FUNC(int, fake_lora_send, const struct device *, uint8_t *, uint32_t);
49
51DECLARE_FAKE_VALUE_FUNC(int, fake_lora_send_async, const struct device *, uint8_t *, uint32_t,
52 struct k_poll_signal *);
53
55DECLARE_FAKE_VALUE_FUNC(int, fake_lora_recv, const struct device *, uint8_t *, uint8_t, k_timeout_t,
56 int16_t *, int8_t *);
57
59DECLARE_FAKE_VALUE_FUNC(int, fake_lora_recv_async, const struct device *, lora_recv_cb, void *);
60
61#if defined(CONFIG_LORA_FAKE_OPTIONAL_API) || defined(__DOXYGEN__)
63DECLARE_FAKE_VALUE_FUNC(int, fake_lora_cad, const struct device *, k_timeout_t);
64
66DECLARE_FAKE_VALUE_FUNC(int, fake_lora_cad_async, const struct device *, lora_cad_cb, void *);
67
69DECLARE_FAKE_VALUE_FUNC(int, fake_lora_rssi, const struct device *, int16_t *);
70
72DECLARE_FAKE_VALUE_FUNC(int, fake_lora_recv_duty_cycle, const struct device *, k_timeout_t,
74
76DECLARE_FAKE_VALUE_FUNC(int, fake_lora_recv_duty_cycle_async, const struct device *, k_timeout_t,
77 k_timeout_t, lora_recv_cb, void *);
78
80DECLARE_FAKE_VALUE_FUNC(int, fake_lora_test_cw, const struct device *, uint32_t, int8_t, uint16_t);
81#endif /* defined(CONFIG_LORA_FAKE_OPTIONAL_API) || defined(__DOXYGEN__) */
82
86
87#ifdef __cplusplus
88}
89#endif
90
91#endif /* ZEPHYR_INCLUDE_DRIVERS_LORA_LORA_FAKE_H_ */
#define DECLARE_FAKE_VALUE_FUNC(...)
Definition fff.h:8684
void(* lora_cad_cb)(const struct device *dev, bool activity_detected, void *user_data)
Callback API for channel activity detection asynchronously.
Definition lora.h:322
void(* lora_recv_cb)(const struct device *dev, uint8_t *data, uint16_t size, int16_t rssi, int8_t snr, void *user_data)
@def_driverbackendgroup{LoRa,lora_interface}
Definition lora.h:312
Main header file for LoRa driver API.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
__INT8_TYPE__ int8_t
Definition stdint.h:72
__INT16_TYPE__ int16_t
Definition stdint.h:73
Runtime device structure (in ROM) per driver instance.
Definition device.h:543
Poll signal object.
Definition kernel.h:6798
Kernel timeout type.
Definition clock.h:65
Structure containing the configuration of a LoRa modem.
Definition lora.h:227