First attempt at LoRa USB Tx
Dependencies: BufferedSerial SX1276GenericLib mbed
Fork of DISCO-L072CZ-LRWAN1_LoRa_PingPong by
main.h
- Committer:
- akashvibhute
- Date:
- 2018-01-02
- Revision:
- 11:52f7b34f1d3a
- Parent:
- 0:c43b6919ae15
File content as of revision 11:52f7b34f1d3a:
/* * Copyright (c) 2017 Helmut Tschemernjak * 30826 Garbsen (Hannover) Germany * Licensed under the Apache License, Version 2.0); */ #include "mbed.h" #include "PinMap.h" #include "BufferedSerial.h" #include "sx1276-mbed-hal.h" void SystemClock_Config(void); extern BufferedSerial *ser; extern void dump(const char *title, const void *data, int len, bool dwords = false); #define dprintf(...) { ser->printf(__VA_ARGS__); ser->printf("\r\n"); } int SX1276PingPong(void); int SX1276Comm(uint8_t *commDataTx, bool mode, bool ack); /* * Callback functions prototypes */ /*! * @brief Function to be executed on Radio Tx Done event */ void OnTxDone(void *radio); /*! * @brief Function to be executed on Radio Rx Done event */ void OnRxDone(void *radio, uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr ); /*! * @brief Function executed on Radio Tx Timeout event */ void OnTxTimeout(void *radio); /*! * @brief Function executed on Radio Rx Timeout event */ void OnRxTimeout(void *radio); /*! * @brief Function executed on Radio Rx Error event */ void OnRxError(void *radio); /*! * @brief Function executed on Radio Fhss Change Channel event */ void OnFhssChangeChannel(void *radio, uint8_t channelIndex ); /*! * @brief Function executed on CAD Done event */ void OnCadDone(void *radio);