9 #ifndef __SERVICE_LORA_P2P_H__ 10 #define __SERVICE_LORA_P2P_H__ 20 #include "pin_define.h" 24 #ifdef P2P_DEBUG_ENABLE 25 #define LORA_P2P_DEBUG(fmt, args...) udrv_serial_log_printf(fmt, ##args) 27 #define LORA_P2P_DEBUG(fmt, args...) 31 #define LORA_SYMBOL_TIMEOUT 5 32 #define LORA_FIX_LENGTH_PAYLOAD_ON false 33 #define LORA_IQ_INVERSION_ON false 35 #define LORA_BUFFER_SIZE 255 49 #define LORA_CHIP_SX1276 51 #define LORA_CHIP_SX126X 52 #elif defined rak11720 53 #define LORA_CHIP_SX126X 54 #elif defined rak3172 \ 55 || defined rak3172-sip \ 57 #define LORA_CHIP_STM32WLE5XX 60 #ifdef LORA_CHIP_SX1276 61 #define SYMBTIMEOUT_MAX 1023 62 #elif defined LORA_CHIP_SX126X 63 #define SYMBTIMEOUT_MAX 248 64 #elif defined LORA_CHIP_STM32WLE5XX 65 #define SYMBTIMEOUT_MAX 248 67 #define SYMBTIMEOUT_MAX 0 219 #endif // end SUPPORT_LORA 221 #endif // __SERVICE_LORA_P2P_H__ int32_t service_lora_p2p_set_bandwidth(uint32_t bandwidth)
uint32_t service_lora_p2p_get_bandwidth(void)
int32_t service_lora_p2p_recv(uint32_t timeout)
bool isRxCancel
Definition: service_lora_p2p.h:81
int32_t service_lora_p2p_check_runtime_sf(uint8_t spreadfact)
bool service_lora_p2p_get_fix_length_payload(void)
int8_t Snr
Definition: service_lora_p2p.h:107
int32_t service_lora_p2p_set_sf(uint8_t spreadfact)
int32_t service_lora_p2p_set_freq(uint32_t freq)
uint32_t service_lora_p2p_get_bitrate(void)
bool isRadioBusy
Definition: service_lora_p2p.h:82
int32_t service_lora_p2p_register_send_CAD_cb(service_lora_p2p_send_CAD_cb_type callback)
int32_t service_lora_p2p_get_crypto_IV(uint8_t *buff, uint32_t len)
int32_t service_lora_p2p_set_symbol_timeout(uint32_t symbol_timeout)
bool isContinue
Definition: service_lora_p2p.h:83
Definition: service_lora_p2p.h:43
uint8_t service_lora_p2p_get_powerdbm(void)
bool isContinue_compatible_tx
Definition: service_lora_p2p.h:85
int32_t service_lora_p2p_check_runtime_codingrate(uint8_t codingrate)
int32_t service_lora_p2p_set_bitrate(uint32_t bitrate)
Definition: service_lora_p2p.h:80
int32_t service_lora_p2p_send(uint8_t *p_data, uint8_t len, bool cad_enable)
int32_t service_lora_p2p_init(void)
uint8_t * Buffer
Definition: service_lora_p2p.h:94
bool service_lora_p2p_get_public_network(void)
bool service_lora_p2p_get_CAD(void)
uint8_t service_lora_p2p_get_sf(void)
volatile bool isCAD
Definition: service_lora_p2p.h:86
int32_t service_lora_p2p_set_crypto_IV(uint8_t *buff, uint32_t len)
uint8_t BufferSize
Definition: service_lora_p2p.h:98
int32_t service_lora_p2p_check_runtime_bandwidth(uint32_t bandwidth)
int32_t service_lora_p2p_encrpty(uint8_t *indata, uint16_t inlen, uint8_t *outdata)
void(* service_lora_p2p_send_cb_type)(void)
Definition: service_lora_p2p.h:110
int32_t service_lora_p2p_set_iqinverted(bool iqinverted)
int32_t service_lora_p2p_set_syncword(uint16_t syncword)
uint8_t service_lora_p2p_get_codingrate(void)
int32_t service_lora_p2p_set_preamlen(uint16_t preamlen)
int32_t service_lora_p2p_register_recv_cb(service_lora_p2p_recv_cb_type callback)
int32_t service_lora_p2p_config(void)
uint32_t service_lora_p2p_get_fdev(void)
int32_t service_lora_p2p_set_codingrate(uint8_t codingrate)
int32_t service_lora_p2p_set_fix_length_payload(bool enable)
int32_t service_lora_p2p_check_runtime_powerdbm(uint8_t powerdbm)
bool service_lora_p2p_get_iqinverted(void)
int32_t service_lora_p2p_register_send_cb(service_lora_p2p_send_cb_type callback)
void(* service_lora_p2p_send_CAD_cb_type)(bool)
Definition: service_lora_p2p.h:112
int32_t service_lora_p2p_set_crypto_key(uint8_t *buff, uint32_t len)
int32_t service_lora_p2p_check_runtime_preamlen(uint16_t preamlen)
int32_t service_lora_p2p_set_powerdbm(uint8_t powerdbm)
int32_t service_lora_p2p_check_runtime_freq(uint32_t freq)
int16_t Rssi
Definition: service_lora_p2p.h:103
void(* service_lora_p2p_recv_cb_type)(rui_lora_p2p_recv_t recv_data_pkg)
Definition: service_lora_p2p.h:111
int32_t service_lora_p2p_get_crypto_key(uint8_t *buff, uint32_t len)
uint16_t service_lora_p2p_get_syncword(void)
RAK_LORA_P2P_SYNCWORD
Definition: service_lora_p2p.h:40
int32_t service_lora_p2p_set_CAD(bool enable)
bool service_lora_p2p_get_crypto_enable(void)
int32_t service_lora_p2p_decrpty(uint8_t *indata, uint16_t inlen, uint8_t *outdata)
uint32_t service_lora_p2p_get_freq(void)
int32_t service_lora_p2p_set_public_network(bool enable)
int32_t service_lora_p2p_set_crypto_enable(bool enable)
bool isContinue_no_exit
Definition: service_lora_p2p.h:84
int32_t service_lora_p2p_set_fdev(uint32_t fdev)
Definition: service_lora_p2p.h:42
uint32_t service_lora_p2p_get_symbol_timeout(void)
struct rui_lora_p2p_revc rui_lora_p2p_recv_t
uint16_t service_lora_p2p_get_preamlen(void)
bool service_lora_p2p_get_radio_stat(void)
Definition: service_lora_p2p.h:89