STM32F1 HAL Fixes (#10999)
- Enable / disable interrupts with `__iSeiRetVal` / `__iCliRetVal` - Add STM32F1 to Travis CI tests
This commit is contained in:
		
				
					committed by
					
						
						Scott Lahteine
					
				
			
			
				
	
			
			
			
						parent
						
							43bdd0bfe4
						
					
				
				
					commit
					2ddba201c0
				
			@@ -40,7 +40,7 @@
 | 
			
		||||
// --------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
 | 
			
		||||
#include <libmaple/atomic.h>
 | 
			
		||||
#include <Arduino.h>
 | 
			
		||||
 | 
			
		||||
// --------------------------------------------------------------------------
 | 
			
		||||
@@ -119,11 +119,11 @@ void HAL_init();
 | 
			
		||||
  #define analogInputToDigitalPin(p) (p)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define CRITICAL_SECTION_START  uint32_t primask = __get_PRIMASK(); __disable_irq()
 | 
			
		||||
#define CRITICAL_SECTION_END    if (!primask) __enable_irq()
 | 
			
		||||
#define ISRS_ENABLED() (!__get_PRIMASK())
 | 
			
		||||
#define ENABLE_ISRS()  __enable_irq()
 | 
			
		||||
#define DISABLE_ISRS() __disable_irq()
 | 
			
		||||
#define CRITICAL_SECTION_START  uint32_t primask = __get_primask(); (void)__iCliRetVal()
 | 
			
		||||
#define CRITICAL_SECTION_END    if (!primask) (void)__iSeiRetVal()
 | 
			
		||||
#define ISRS_ENABLED() (!__get_primask)
 | 
			
		||||
#define ENABLE_ISRS()  ((void)__iSeiRetVal())
 | 
			
		||||
#define DISABLE_ISRS() ((void)__iCliRetVal())
 | 
			
		||||
 | 
			
		||||
// On AVR this is in math.h?
 | 
			
		||||
#define square(x) ((x)*(x))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user