First attempt at LoRa USB Tx

Dependencies:   BufferedSerial SX1276GenericLib mbed

Fork of DISCO-L072CZ-LRWAN1_LoRa_PingPong by ST

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.h Source File

main.h

00001 /*
00002  * Copyright (c) 2017 Helmut Tschemernjak
00003  * 30826 Garbsen (Hannover) Germany
00004  * Licensed under the Apache License, Version 2.0);
00005  */
00006 
00007 #include "mbed.h"
00008 #include "PinMap.h"
00009 #include "BufferedSerial.h"
00010 #include "sx1276-mbed-hal.h"
00011 
00012 void SystemClock_Config(void);
00013 
00014 extern BufferedSerial *ser;
00015 extern void dump(const char *title, const void *data, int len, bool dwords = false);
00016 
00017 #define dprintf(...) { ser->printf(__VA_ARGS__); ser->printf("\r\n"); }
00018 
00019 int SX1276PingPong(void);
00020 int SX1276Comm(uint8_t *commDataTx, bool mode, bool ack);
00021 /*
00022  * Callback functions prototypes
00023  */
00024 /*!
00025  * @brief Function to be executed on Radio Tx Done event
00026  */
00027 void OnTxDone(void *radio);
00028 
00029 /*!
00030  * @brief Function to be executed on Radio Rx Done event
00031  */
00032 void OnRxDone(void *radio, uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr );
00033 
00034 /*!
00035  * @brief Function executed on Radio Tx Timeout event
00036  */
00037 void OnTxTimeout(void *radio);
00038 
00039 /*!
00040  * @brief Function executed on Radio Rx Timeout event
00041  */
00042 void OnRxTimeout(void *radio);
00043 
00044 /*!
00045  * @brief Function executed on Radio Rx Error event
00046  */
00047 void OnRxError(void *radio);
00048 
00049 /*!
00050  * @brief Function executed on Radio Fhss Change Channel event
00051  */
00052 void OnFhssChangeChannel(void *radio, uint8_t channelIndex );
00053 
00054 /*!
00055  * @brief Function executed on CAD Done event
00056  */
00057 void OnCadDone(void *radio);