Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LoRaPHYKR920.h Source File

LoRaPHYKR920.h

Go to the documentation of this file.
00001 /**
00002  *  @file LoRaPHYKR920.h
00003  *
00004  *  @brief Implements LoRaPHY for Korean 920 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_KR920_H_
00033 #define MBED_OS_LORAPHY_KR920_H_
00034 
00035 #if !(DOXYGEN_ONLY)
00036 
00037 #include "LoRaPHY.h"
00038 
00039 /*!
00040  * LoRaMac maximum number of channels
00041  */
00042 #define KR920_MAX_NB_CHANNELS                       16
00043 
00044 /*!
00045  * Maximum number of bands
00046  */
00047 #define KR920_MAX_NB_BANDS                          1
00048 
00049 #define KR920_CHANNEL_MASK_SIZE                    1
00050 
00051 
00052 class LoRaPHYKR920 : public LoRaPHY {
00053 
00054 public:
00055 
00056     LoRaPHYKR920();
00057     virtual ~LoRaPHYKR920();
00058 
00059     virtual bool verify_frequency_for_band(uint32_t freq, uint8_t band) const;
00060 
00061     virtual bool tx_config(tx_config_params_t *config, int8_t *tx_power,
00062                            lorawan_time_t *tx_toa);
00063 
00064     virtual lorawan_status_t set_next_channel(channel_selection_params_t *params, uint8_t *channel,
00065                                               lorawan_time_t *time,
00066                                               lorawan_time_t *aggregate_timeOff);
00067 
00068     virtual void set_tx_cont_mode(cw_mode_params_t  *continuousWave,
00069                                   uint32_t frequency = 0);
00070 
00071 
00072 private:
00073 
00074     int8_t get_max_eirp(uint32_t freq);
00075 
00076     /**
00077      * LoRaMAC channels
00078      */
00079     channel_params_t channels[KR920_MAX_NB_CHANNELS];
00080 
00081     /**
00082      * LoRaMac bands
00083      */
00084     band_t  bands[KR920_MAX_NB_BANDS];
00085 
00086     /**
00087      * LoRaMac channel mask
00088      */
00089     uint16_t channel_mask[KR920_CHANNEL_MASK_SIZE];
00090 
00091     /**
00092      * LoRaMac default channel mask
00093      */
00094     uint16_t default_channel_mask[KR920_CHANNEL_MASK_SIZE];
00095 };
00096 
00097 #endif /* DOXYGEN_ONLY */
00098 #endif // MBED_OS_LORAPHY_KR920_H_
00099