Remove support for no busy pin set
This commit is contained in:
		
							parent
							
								
									055083ffba
								
							
						
					
					
						commit
						ebdec7f3e0
					
				
							
								
								
									
										12
									
								
								sx126x.cpp
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								sx126x.cpp
									
									
									
									
									
								
							| @ -202,14 +202,12 @@ void sx126x::loraMode() { | ||||
| 
 | ||||
| void sx126x::waitOnBusy() { | ||||
|     unsigned long time = millis(); | ||||
|     if (_busy != -1) { | ||||
|         while (digitalRead(_busy) == HIGH) | ||||
|         { | ||||
|             if (millis() >= (time + 100)) { | ||||
|                 break; | ||||
|             } | ||||
|             // do nothing
 | ||||
|     while (digitalRead(_busy) == HIGH) | ||||
|     { | ||||
|         if (millis() >= (time + 100)) { | ||||
|             break; | ||||
|         } | ||||
|         // do nothing
 | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										5
									
								
								sx126x.h
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								sx126x.h
									
									
									
									
									
								
							| @ -9,14 +9,14 @@ | ||||
| 
 | ||||
| #include <Arduino.h> | ||||
| #include <SPI.h> | ||||
| #include "Modem.h" | ||||
| #include "Interfaces.h" | ||||
| 
 | ||||
| #define LORA_DEFAULT_SS_PIN    10 | ||||
| #define LORA_DEFAULT_RESET_PIN 9 | ||||
| #define LORA_DEFAULT_DIO0_PIN  2 | ||||
| #define LORA_DEFAULT_RXEN_PIN  -1 | ||||
| #define LORA_DEFAULT_TXEN_PIN  -1 | ||||
| #define LORA_DEFAULT_BUSY_PIN  -1 | ||||
| #define LORA_DEFAULT_BUSY_PIN  11 | ||||
| 
 | ||||
| #define PA_OUTPUT_RFO_PIN      0 | ||||
| #define PA_OUTPUT_PA_BOOST_PIN 1 | ||||
| @ -139,6 +139,7 @@ private: | ||||
|   uint8_t _packet[255]; | ||||
|   bool _preinit_done; | ||||
|   void (*_onReceive)(int); | ||||
|   bool _tcxo; | ||||
| }; | ||||
| 
 | ||||
| extern sx126x sx126x_modem; | ||||
|  | ||||
							
								
								
									
										12
									
								
								sx128x.cpp
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								sx128x.cpp
									
									
									
									
									
								
							| @ -206,14 +206,12 @@ void sx128x::loraMode() { | ||||
| 
 | ||||
| void sx128x::waitOnBusy() { | ||||
|     unsigned long time = millis(); | ||||
|     if (_busy != -1) { | ||||
|         while (digitalRead(_busy) == HIGH) | ||||
|         { | ||||
|             if (millis() >= (time + 100)) { | ||||
|                 break; | ||||
|             } | ||||
|             // do nothing
 | ||||
|     while (digitalRead(_busy) == HIGH) | ||||
|     { | ||||
|         if (millis() >= (time + 100)) { | ||||
|             break; | ||||
|         } | ||||
|         // do nothing
 | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										4
									
								
								sx128x.h
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								sx128x.h
									
									
									
									
									
								
							| @ -9,14 +9,14 @@ | ||||
| 
 | ||||
| #include <Arduino.h> | ||||
| #include <SPI.h> | ||||
| #include "Modem.h" | ||||
| #include "Interfaces.h" | ||||
| 
 | ||||
| #define LORA_DEFAULT_SS_PIN    10 | ||||
| #define LORA_DEFAULT_RESET_PIN 9 | ||||
| #define LORA_DEFAULT_DIO0_PIN  2 | ||||
| #define LORA_DEFAULT_RXEN_PIN  -1 | ||||
| #define LORA_DEFAULT_TXEN_PIN  -1 | ||||
| #define LORA_DEFAULT_BUSY_PIN  -1 | ||||
| #define LORA_DEFAULT_BUSY_PIN  11 | ||||
| 
 | ||||
| #define PA_OUTPUT_RFO_PIN      0 | ||||
| #define PA_OUTPUT_PA_BOOST_PIN 1 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user