LoRa node acquiring analog input and sending to LoRa Server - Working ok
Dependents: DISCO-L072CZ-LRWAN1_LoRa_node EIoT_LoRa_node_1 EIoT_LoRa_node_2 EIoT_LoRa_node_3
Fork of SX1276GenericLib by
Diff: sx1276/sx1276-hal.cpp
- Revision:
- 4:f0ce52e94d3f
- Parent:
- 3:ca84be1f3fac
- Child:
- 5:11ec8a6ba4f0
--- a/sx1276/sx1276-hal.cpp Tue Aug 19 09:15:01 2014 +0000 +++ b/sx1276/sx1276-hal.cpp Wed Aug 20 06:29:01 2014 +0000 @@ -13,7 +13,6 @@ Maintainers: Miguel Luis, Gregory Cristian and Nicolas Huguenin */ #include "sx1276-hal.h" -#include "debug.h" const RadioRegisters_t SX1276MB1xAS::RadioRegsInit[] = { @@ -102,19 +101,17 @@ uint8_t SX1276MB1xAS::DetectBoardType( void ) { antSwitch.input( ); - wait_us( 10 ); + wait_ms( 1 ); if( antSwitch == 1 ) { boardConnected = SX1276MB1LAS; - debug("\r\n >>>>>>>>>>>>>SX1276MB1LAS \r\n" ); } else { boardConnected = SX1276MB1MAS; - debug("\r\n >>>>>>>>>>>>>SX1276MB1MAS \r\n" ); } antSwitch.output( ); - wait_us( 10 ); + wait_ms( 1 ); return ( boardConnected ); } @@ -136,7 +133,6 @@ void SX1276MB1xAS::SpiInit( void ) { - nss = 1; spi.format( 8,0 ); uint32_t frequencyToSet = 8000000; @@ -246,9 +242,10 @@ void SX1276MB1xAS::Reset( void ) { + reset.output(); reset = 0; wait_ms( 1 ); - reset = 1; + reset.input(); wait_ms( 6 ); }