KETCube
|
This file contains the KETCube module wrapper for Semtech's LoRa. More...
#include <stdio.h>
#include <string.h>
#include "ketCube_lora.h"
#include "ketCube_cfg.h"
#include "ketCube_common.h"
#include "ketCube_mcu.h"
#include "ketCube_terminal.h"
#include "ketCube_remote_terminal.h"
#include "ketCube_modules.h"
#include "ketCube_rxDisplay.h"
#include "hw.h"
#include "lora.h"
#include "timeServer.h"
#include "lora_mac_version.h"
#include "ketCube_radio.h"
#include "ketCube_spi.h"
#include "ketCube_ad.h"
#include "ketCube_batMeas.h"
Macros | |
#define | LORAWAN_ADR_ON 1 |
#define | LORAWAN_DEFAULT_CONFIRM_MSG_STATE LORAWAN_UNCONFIRMED_MSG |
#define | LORAWAN_APP_PORT 2 |
#define | LORAWAN_ASYNCAPP_PORT 3 |
#define | LORAWAN_HEX_DISPLAY_PORT 10 |
#define | LORAWAN_STRING_DISPLAY_PORT 11 |
#define | LORAWAN_CUSTOM_DATA_PORT 12 |
#define | LORAWAN_REMOTE_TERMINAL_PORT 13 |
#define | LORAWAN_UART2WAN_PORT 14 |
Functions | |
static void | ketCube_lora_TxNeeded (void) |
static void | ketCube_lora_RxData (lora_AppData_t *AppData) |
LoRa Rx Data callback ... More... | |
static void | ketCube_lora_HasJoined (void) |
static void | ketCube_lora_ConfirmClass (DeviceClass_t Class) |
static void | ketCube_lora_MacProcessNotify (void) |
static void | ketCube_lora_DataConfirm (void) |
static ketCube_cfg_ModError_t | ketCube_lora_SendData (lora_AppData_t *AppData) |
ketCube_cfg_ModError_t | ketCube_lora_Init (ketCube_InterModMsg_t ***msg) |
Load basic module configuration data from EEPROM. More... | |
ketCube_cfg_ModError_t | ketCube_lora_Send (uint8_t *buffer, uint8_t *len) |
Process lora state and prepare data... More... | |
ketCube_cfg_ModError_t | ketCube_lora_AsyncSend (uint8_t *buffer, uint8_t *len) |
Process lora state and prepare data (for asynchronous send)... More... | |
ketCube_cfg_ModError_t | ketCube_lora_RemoteTerminalSend (uint8_t *buffer, uint8_t *len) |
Process lora state and prepare data for remote terminal sending. More... | |
ketCube_cfg_ModError_t | ketCube_lora_SleepEnter (void) |
Prepare sleep mode. More... | |
ketCube_cfg_ModError_t | ketCube_lora_SleepExit (void) |
Exit sleep mode. More... | |
__weak void | ketCube_lora_processCustomData (uint8_t *buffer, uint8_t len) |
Process custom data. More... | |
Variables | |
ketCube_lora_moduleCfg_t | ketCube_lora_moduleCfg |
static volatile bool | evntJoined = FALSE |
static volatile bool | isJoined = FALSE |
static volatile bool | evntClassSwitched = FALSE |
static volatile bool | evntTxNeeded = FALSE |
static volatile bool | evntACKRx = FALSE |
static LoRaMainCallback_t | LoRaMainCallbacks |
LoraFlagStatus | LoraMacProcessRequest = LORA_RESET |
static LoRaParam_t | LoRaParamInit |
ketCube_InterModMsg_t | ketCube_lora_rxData |
uint8_t | ketCube_lora_rxDataBuff [KETCUBE_LORA_RX_BUFFER_LEN] |
static ketCube_InterModMsg_t * | modMsgQueue [2] |
This file contains the KETCube module wrapper for Semtech's LoRa.
Developed by: The SmartCampus Team Department of Technologies and Measurement www.smartcampus.cz | www.zcu.cz
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
#define LORAWAN_ADR_ON 1 |
LoRaWAN Adaptive Data Rate
#define LORAWAN_APP_PORT 2 |
LoRaWAN application port
#define LORAWAN_ASYNCAPP_PORT 3 |
LoRaWAN application port for Async messagess
#define LORAWAN_CUSTOM_DATA_PORT 12 |
#define LORAWAN_DEFAULT_CONFIRM_MSG_STATE LORAWAN_UNCONFIRMED_MSG |
LoRaWAN default confirm state
#define LORAWAN_HEX_DISPLAY_PORT 10 |
#define LORAWAN_REMOTE_TERMINAL_PORT 13 |
#define LORAWAN_STRING_DISPLAY_PORT 11 |
#define LORAWAN_UART2WAN_PORT 14 |
|
static |
|
static |
|
static |
|
static |
ketCube_cfg_ModError_t ketCube_lora_RemoteTerminalSend | ( | uint8_t * | buffer, |
uint8_t * | len | ||
) |
Process lora state and prepare data for remote terminal sending.
|
static |
LoRa Rx Data callback ...
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
ketCube_InterModMsg_t ketCube_lora_rxData |
uint8_t ketCube_lora_rxDataBuff[KETCUBE_LORA_RX_BUFFER_LEN] |
LoraFlagStatus LoraMacProcessRequest = LORA_RESET |
|
static |
|
static |
Initialises the Lora Parameters
|
static |