Coragem update
Dependents: Coragem_all_sensors Lora_SX1272_Coragem
Diff: SX1272.h
- Revision:
- 2:a5a72d30cb18
- Parent:
- 1:5d57c6a92509
- Child:
- 3:82630593359c
--- a/SX1272.h Sun Nov 05 17:02:01 2017 +0000 +++ b/SX1272.h Tue Feb 06 09:58:17 2018 +0000 @@ -22,6 +22,12 @@ * Implementation: Covadonga Albiñana & Victor Boria */ +//Adaptation for NUCLEO STM32 by C.Dupaty. According to a program by C.Pham +// Tested on NUCLEO L073RZ with SX1272 MB2xAS Arduino shield +// please visit http://cpham.perso.univ-pau.fr/LORA/LoRaDevices.html +// for original version for ARDUINO + + #ifndef SX1272_h #define SX1272_h @@ -31,9 +37,8 @@ #include <stdlib.h> #include <stdint.h> -#include <Arduino.h> +#include <ArduinoLike.h> #include "mbed.h" -#include <SPI.h> #ifndef inttypes_h #include <inttypes.h> @@ -48,23 +53,9 @@ #define W_REQUESTED_ACK //#define W_NET_KEY //#define W_INITIALIZATION -#define SX1272_RST 3 - -#if defined ARDUINO_AVR_PRO || defined ARDUINO_AVR_NANO || defined ARDUINO_AVR_MICRO || defined ARDUINO_AVR_MINI \ -|| defined __MK20DX256__ || defined __MKL26Z64__ -#define SX1272_SS 10 -#elif defined ARDUINO_AVR_FEATHER32U4 || defined ARDUINO_SAMD_FEATHER_M0 -// on the Adafruit Feather, the RFM95W is embeded and CS pin is normally on pin 8 -#define SX1272_SS 8 -#undef SX1272_RST -#define SX1272_RST 4 -#else -#define SX1272_SS 2 -#endif #define SX1272Chip 0 #define SX1276Chip 1 -// end #define SX1272_debug_mode 0 // 0 1 2 //#define DEBUG_CAD //