Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
LoRaPHYCN470.h
00001 /** 00002 * @file LoRaPHYCN470.h 00003 * 00004 * @brief Implements LoRaPHY for Chinese 470 MHz band 00005 * 00006 * \code 00007 * ______ _ 00008 * / _____) _ | | 00009 * ( (____ _____ ____ _| |_ _____ ____| |__ 00010 * \____ \| ___ | (_ _) ___ |/ ___) _ \ 00011 * _____) ) ____| | | || |_| ____( (___| | | | 00012 * (______/|_____)_|_|_| \__)_____)\____)_| |_| 00013 * (C)2013 Semtech 00014 * ___ _____ _ ___ _ _____ ___ ___ ___ ___ 00015 * / __|_ _/_\ / __| |/ / __/ _ \| _ \/ __| __| 00016 * \__ \ | |/ _ \ (__| ' <| _| (_) | / (__| _| 00017 * |___/ |_/_/ \_\___|_|\_\_| \___/|_|_\\___|___| 00018 * embedded.connectivity.solutions=============== 00019 * 00020 * \endcode 00021 * 00022 * 00023 * License: Revised BSD License, see LICENSE.TXT file include in the project 00024 * 00025 * Maintainer: Miguel Luis ( Semtech ), Gregory Cristian ( Semtech ) and Daniel Jaeckle ( STACKFORCE ) 00026 * 00027 * Copyright (c) 2017, Arm Limited and affiliates. 00028 * SPDX-License-Identifier: BSD-3-Clause 00029 * 00030 */ 00031 00032 #ifndef MBED_OS_LORAPHY_CN470_H_ 00033 #define MBED_OS_LORAPHY_CN470_H_ 00034 00035 #if !(DOXYGEN_ONLY) 00036 00037 #include "LoRaPHY.h" 00038 00039 // Definitions 00040 /*! 00041 * LoRaMac maximum number of channels 00042 */ 00043 #define CN470_MAX_NB_CHANNELS 96 00044 00045 /*! 00046 * LoRaMac maximum number of bands 00047 */ 00048 #define CN470_MAX_NB_BANDS 1 00049 00050 00051 #define CN470_CHANNEL_MASK_SIZE 6 00052 00053 00054 class LoRaPHYCN470 : public LoRaPHY { 00055 00056 public: 00057 00058 LoRaPHYCN470(); 00059 virtual ~LoRaPHYCN470(); 00060 00061 virtual lorawan_status_t set_next_channel(channel_selection_params_t *params, 00062 uint8_t *channel, lorawan_time_t *time, 00063 lorawan_time_t *aggregate_timeoff); 00064 00065 virtual bool rx_config(rx_config_params_t *config); 00066 00067 virtual bool tx_config(tx_config_params_t *config, int8_t *tx_power, 00068 lorawan_time_t *tx_toa); 00069 00070 virtual uint8_t link_ADR_request(adr_req_params_t *params, int8_t *dr_out, 00071 int8_t *tx_power_out, uint8_t *nb_rep_out, 00072 uint8_t *nb_bytes_parsed); 00073 00074 virtual uint8_t accept_rx_param_setup_req(rx_param_setup_req_t *params); 00075 00076 private: 00077 00078 /*! 00079 * LoRaMAC channels 00080 */ 00081 channel_params_t channels[CN470_MAX_NB_CHANNELS]; 00082 00083 /*! 00084 * LoRaMac bands 00085 */ 00086 band_t bands[CN470_MAX_NB_BANDS]; 00087 00088 /*! 00089 * LoRaMac channel mask 00090 */ 00091 uint16_t channel_mask[CN470_CHANNEL_MASK_SIZE]; 00092 00093 /*! 00094 * LoRaMac default channel mask 00095 */ 00096 uint16_t default_channel_mask[CN470_CHANNEL_MASK_SIZE]; 00097 }; 00098 00099 #endif /* DOXYGEN_ONLY*/ 00100 #endif /* MBED_OS_LORAPHY_CN470_H_ */
Generated on Tue Jul 12 2022 13:54:26 by
1.7.2