The NSL01 library contains the software stack to control the NSL01 LoRaWAN shield from mCloud System GmbH. The NSL01 is a professional plug & play LoRaWAN shield for a wide range of STM32 Nucleo-64 boards with Arduino Uno Rev 3 connectivity. For more information about the NSL01 LoRaWAN shield have a look at: http://www.mcloud-systems.com/nsl01-lorawan-nucleo-arduino-shield

Fork of NSL01 by mCloud Systems

Embed: (wiki syntax)

« Back to documentation index

SerialDevice.h File Reference

SerialDevice.h File Reference

Functions for NSL01 class to communicate with onboard RF radio module via UART interface. More...

Go to the source code of this file.

Functions

void SerialDevice_Open (UINT32 baudRate, int dataBits)
 Function to open serial device with given parameters.
void rxCallback (void)
 UART Rx callback function for data reception.
int SerialDevice_SendByte (UINT8 txByte)
 Function to transmit a single (wakeup) byte to the RF device.
int SerialDevice_SendData (UINT8 *txBuffer, int txLength)
 Function to transmit data to the RF device.
int SerialDevice_ReadData (UINT8 *rxBuffer, int rxBufferSize)
 Function to manually read data into Rx buffer.

Detailed Description

Functions for NSL01 class to communicate with onboard RF radio module via UART interface.

For more information about the NSL01 LoRaWAN shield: http://www.mcloud-systems.com/nsl01-lorawan-nucleo-arduino-shield

Note:
The SerialDevice files are included in the dependencies directory of the project and these files are necessary for the NSL01 class!
Author:
mCloud Systems Team
Version:
V1.0
Date:
20-June-2018

Definition in file SerialDevice.h.


Function Documentation

void rxCallback ( void   )

UART Rx callback function for data reception.

Definition at line 173 of file SerialDevice.cpp.

void SerialDevice_Open ( UINT32  baudRate,
int  dataBits 
)

Function to open serial device with given parameters.

Note:
The serial object have to be defined in main.cpp file!
Parameters:
baudrate: Baudrate for serial communication
dataBits: Number of data bits for serial communication

Definition at line 36 of file SerialDevice.cpp.

int SerialDevice_ReadData ( UINT8 *  rxBuffer,
int  rxBufferSize 
)

Function to manually read data into Rx buffer.

Note:
This function is not necessary at the moment, because of internal Rx callback function!
Parameters:
rxBuffer: Pointer to Rx buffer
rxBufferSize: Length of Rx buffer
Returns:
number of Rx bytes on success, -1 on error

Definition at line 143 of file SerialDevice.cpp.

int SerialDevice_SendByte ( UINT8  txByte )

Function to transmit a single (wakeup) byte to the RF device.

Parameters:
txByte: Tx byte
Returns:
1 on success, -1 on error

Definition at line 118 of file SerialDevice.cpp.

int SerialDevice_SendData ( UINT8 *  txBuffer,
int  txLength 
)

Function to transmit data to the RF device.

Parameters:
txBuffer: Pointer to Tx buffer
txLength: Length of Tx buffer
Returns:
number of Tx bytes on success, -1 on error

Definition at line 59 of file SerialDevice.cpp.