![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
EIoT LoRa node 2 - Working ok
Dependencies: BufferedSerial SX1276GenericLib-node1 mbed
Fork of DISCO-L072CZ-LRWAN1_LoRa_node by
SX1276GenericPingPong/GenericPingPong.h@13:c2c91cc0467d, 2018-10-08 (annotated)
- Committer:
- sagilar
- Date:
- Mon Oct 08 16:11:05 2018 +0000
- Revision:
- 13:c2c91cc0467d
- Parent:
- 12:a6a37ba1feff
EIoT LoRa node 2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Helmut64 | 0:c43b6919ae15 | 1 | /* |
Helmut64 | 0:c43b6919ae15 | 2 | / _____) _ | | |
Helmut64 | 0:c43b6919ae15 | 3 | ( (____ _____ ____ _| |_ _____ ____| |__ |
Helmut64 | 0:c43b6919ae15 | 4 | \____ \| ___ | (_ _) ___ |/ ___) _ \ |
Helmut64 | 0:c43b6919ae15 | 5 | _____) ) ____| | | || |_| ____( (___| | | | |
Helmut64 | 0:c43b6919ae15 | 6 | (______/|_____)_|_|_| \__)_____)\____)_| |_| |
Helmut64 | 0:c43b6919ae15 | 7 | ( C )2014 Semtech |
Helmut64 | 0:c43b6919ae15 | 8 | |
Helmut64 | 0:c43b6919ae15 | 9 | Description: Contains the callbacks for the IRQs and any application related details |
Helmut64 | 0:c43b6919ae15 | 10 | |
Helmut64 | 0:c43b6919ae15 | 11 | License: Revised BSD License, see LICENSE.TXT file include in the project |
Helmut64 | 0:c43b6919ae15 | 12 | |
Helmut64 | 0:c43b6919ae15 | 13 | Maintainer: Miguel Luis and Gregory Cristian |
Helmut64 | 0:c43b6919ae15 | 14 | */ |
Helmut64 | 0:c43b6919ae15 | 15 | |
Helmut64 | 0:c43b6919ae15 | 16 | /* |
Helmut64 | 0:c43b6919ae15 | 17 | * This file contains a copy of the master content sx1276PingPong |
Helmut64 | 0:c43b6919ae15 | 18 | * with adaption for the SX1276Generic environment |
Helmut64 | 0:c43b6919ae15 | 19 | * (c) 2017 Helmut Tschemernjak |
Helmut64 | 0:c43b6919ae15 | 20 | * 30826 Garbsen (Hannover) Germany |
Helmut64 | 0:c43b6919ae15 | 21 | */ |
sagilar | 12:a6a37ba1feff | 22 | #include <string> |
sagilar | 12:a6a37ba1feff | 23 | |
Helmut64 | 0:c43b6919ae15 | 24 | #ifndef __SX1276PINGPONG_H__ |
Helmut64 | 0:c43b6919ae15 | 25 | #define __SX1276PINGPONG_H__ |
Helmut64 | 0:c43b6919ae15 | 26 | |
Helmut64 | 0:c43b6919ae15 | 27 | #ifdef FEATURE_LORA |
Helmut64 | 0:c43b6919ae15 | 28 | int SX1276PingPong(void); |
Helmut64 | 0:c43b6919ae15 | 29 | #else |
Helmut64 | 0:c43b6919ae15 | 30 | #define SX1276PingPong(x) void() |
Helmut64 | 0:c43b6919ae15 | 31 | #endif |
Helmut64 | 0:c43b6919ae15 | 32 | /* |
Helmut64 | 0:c43b6919ae15 | 33 | * Callback functions prototypes |
Helmut64 | 0:c43b6919ae15 | 34 | */ |
sagilar | 12:a6a37ba1feff | 35 | char *splitOnPosition(char *msj, int pos); |
sagilar | 13:c2c91cc0467d | 36 | void readTemperature(); |
sagilar | 13:c2c91cc0467d | 37 | void readCurrent(); |
sagilar | 13:c2c91cc0467d | 38 | void sendElectric(); |
sagilar | 13:c2c91cc0467d | 39 | double filter2o(double u, double &v1, double &v2, const double a0, const double a1, const double a2, const double b0, const double b1, const double b2); |
Helmut64 | 0:c43b6919ae15 | 40 | /*! |
Helmut64 | 0:c43b6919ae15 | 41 | * @brief Function to be executed on Radio Tx Done event |
Helmut64 | 0:c43b6919ae15 | 42 | */ |
bcostm | 11:9d7409ebfa57 | 43 | void OnTxDone(void *radio, void *userThisPtr, void *userData); |
Helmut64 | 0:c43b6919ae15 | 44 | |
Helmut64 | 0:c43b6919ae15 | 45 | /*! |
Helmut64 | 0:c43b6919ae15 | 46 | * @brief Function to be executed on Radio Rx Done event |
Helmut64 | 0:c43b6919ae15 | 47 | */ |
bcostm | 11:9d7409ebfa57 | 48 | void OnRxDone(void *radio, void *userThisPtr, void *userData, uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr ); |
Helmut64 | 0:c43b6919ae15 | 49 | |
Helmut64 | 0:c43b6919ae15 | 50 | /*! |
Helmut64 | 0:c43b6919ae15 | 51 | * @brief Function executed on Radio Tx Timeout event |
Helmut64 | 0:c43b6919ae15 | 52 | */ |
bcostm | 11:9d7409ebfa57 | 53 | void OnTxTimeout(void *radio, void *userThisPtr, void *userData); |
Helmut64 | 0:c43b6919ae15 | 54 | |
Helmut64 | 0:c43b6919ae15 | 55 | /*! |
Helmut64 | 0:c43b6919ae15 | 56 | * @brief Function executed on Radio Rx Timeout event |
Helmut64 | 0:c43b6919ae15 | 57 | */ |
bcostm | 11:9d7409ebfa57 | 58 | void OnRxTimeout(void *radio, void *userThisPtr, void *userData); |
Helmut64 | 0:c43b6919ae15 | 59 | |
Helmut64 | 0:c43b6919ae15 | 60 | /*! |
Helmut64 | 0:c43b6919ae15 | 61 | * @brief Function executed on Radio Rx Error event |
Helmut64 | 0:c43b6919ae15 | 62 | */ |
bcostm | 11:9d7409ebfa57 | 63 | void OnRxError(void *radio, void *userThisPtr, void *userData); |
Helmut64 | 0:c43b6919ae15 | 64 | |
Helmut64 | 0:c43b6919ae15 | 65 | /*! |
Helmut64 | 0:c43b6919ae15 | 66 | * @brief Function executed on Radio Fhss Change Channel event |
Helmut64 | 0:c43b6919ae15 | 67 | */ |
bcostm | 11:9d7409ebfa57 | 68 | void OnFhssChangeChannel(void *radio, void *userThisPtr, void *userData, uint8_t channelIndex); |
Helmut64 | 0:c43b6919ae15 | 69 | |
Helmut64 | 0:c43b6919ae15 | 70 | /*! |
Helmut64 | 0:c43b6919ae15 | 71 | * @brief Function executed on CAD Done event |
Helmut64 | 0:c43b6919ae15 | 72 | */ |
bcostm | 11:9d7409ebfa57 | 73 | void OnCadDone(void *radio, void *userThisPtr, void *userData); |
Helmut64 | 0:c43b6919ae15 | 74 | |
bcostm | 11:9d7409ebfa57 | 75 | #endif // __MAIN_H__ |