1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/drivers/include/net/netdev/lora.h
Jose Alamos 9955a35c63
[treewide] lora: use int16_t for RSSI value
The RSSI values reported by LoRa transceiver can be less than -127.
Therefore, `int8_t` is not enough. This commit defines the RSSI of
`netdev_lora_rx_info` as `int16_t` and adapt the drivers accordingly
(sx126x, sx127x).
2022-01-17 17:54:18 +01:00

45 lines
872 B
C

/*
* Copyright (C) 2019 HAW Hamburg
*
* This file is subject to the terms and conditions of the GNU Lesser General
* Public License v2.1. See the file LICENSE in the top level directory for
* more details.
*/
/**
* @defgroup drivers_netdev_lora LoRa drivers
* @ingroup drivers_netdev_api
* @{
*
* @file
* @brief Definitions for netdev common LoRa code
*
* @author José Ignacio Alamos <jose.alamos@haw-hamburg.de>
*/
#ifndef NET_NETDEV_LORA_H
#define NET_NETDEV_LORA_H
#include <stdint.h>
#include "net/netdev.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Received LoRa packet status information
*/
typedef struct {
int16_t rssi; /**< RSSI of a received packet */
int8_t snr; /**< S/N ratio */
} netdev_lora_rx_info_t;
#ifdef __cplusplus
}
#endif
#endif /* NET_NETDEV_LORA_H */
/** @} */