mirror of
				https://github.com/niesteszeck/idDHT11.git
				synced 2025-10-30 22:54:03 +03:00 
			
		
		
		
	Updates idDHT11.h to differentiate between timeouts
Creates three different error codes instead of a single code for three timeout possibilities.
This commit is contained in:
		
							
								
								
									
										10
									
								
								idDHT11.h
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								idDHT11.h
									
									
									
									
									
								
							| @@ -28,10 +28,12 @@ | ||||
|  | ||||
| // error codes | ||||
| #define IDDHTLIB_ERROR_CHECKSUM		-1 | ||||
| #define IDDHTLIB_ERROR_TIMEOUT		-2 | ||||
| #define IDDHTLIB_ERROR_ACQUIRING	-3 | ||||
| #define IDDHTLIB_ERROR_DELTA		-4 | ||||
| #define IDDHTLIB_ERROR_NOTSTARTED	-5 | ||||
| #define IDDHTLIB_ERROR_ISR_TIMEOUT	-2 | ||||
| #define IDDHTLIB_ERROR_RESPONSE_TIMEOUT	-3 | ||||
| #define IDDHTLIB_ERROR_DATA_TIMEOUT	-4 | ||||
| #define IDDHTLIB_ERROR_ACQUIRING	-5 | ||||
| #define IDDHTLIB_ERROR_DELTA		-6 | ||||
| #define IDDHTLIB_ERROR_NOTSTARTED	-7 | ||||
|  | ||||
| #define IDDHT11_CHECK_STATE		if(state == STOPPED)													\ | ||||
| 									return status;													\ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alex Gutowski
					Alex Gutowski