mirror of
https://github.com/zephyrproject-rtos/zephyr.git
synced 2024-12-04 11:39:46 +08:00
a36147c9cb
LoRa radios supported by LoRaMAC-Node have a lot of common functionality. Zephyr's LoRa implementation for the SX1276 uses LoRaMAC-Nodes Radio HAL to implement API functionality like send and recv. The exact same functionality will be used by the SX126x driver. Facilitate sharing by moving that to a separate source file. Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
27 lines
715 B
C
27 lines
715 B
C
/*
|
|
* Copyright (c) 2020 Andreas Sandberg
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef ZEPHYR_DRIVERS_SX12XX_COMMON_H_
|
|
#define ZEPHYR_DRIVERS_SX12XX_COMMON_H_
|
|
|
|
#include <zephyr/types.h>
|
|
#include <drivers/lora.h>
|
|
#include <device.h>
|
|
|
|
int sx12xx_lora_send(struct device *dev, uint8_t *data, uint32_t data_len);
|
|
|
|
int sx12xx_lora_recv(struct device *dev, uint8_t *data, uint8_t size,
|
|
k_timeout_t timeout, int16_t *rssi, int8_t *snr);
|
|
|
|
int sx12xx_lora_config(struct device *dev, struct lora_modem_config *config);
|
|
|
|
int sx12xx_lora_test_cw(struct device *dev, uint32_t frequency, int8_t tx_power,
|
|
uint16_t duration);
|
|
|
|
int sx12xx_init(struct device *dev);
|
|
|
|
#endif /* ZEPHYR_DRIVERS_SX12XX_COMMON_H_ */
|