diff options
author | Damien George <damien.p.george@gmail.com> | 2014-08-25 17:36:14 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-08-25 17:38:55 +0100 |
commit | 29c92a407c8fa04a205f10c4efdb5696e0cf0b58 (patch) | |
tree | 5cb842957202c012732af682f7982031d45acd24 /teensy | |
parent | 2bf044442eae7dbdaff91051d2c135b4aa51f1b2 (diff) | |
download | micropython-29c92a407c8fa04a205f10c4efdb5696e0cf0b58.tar.gz micropython-29c92a407c8fa04a205f10c4efdb5696e0cf0b58.zip |
stmhal: Use MP_OBJ_NEW_SMALL_INT directly in pyb.micros/millis.
Also some whitespace cleanup.
Diffstat (limited to 'teensy')
-rw-r--r-- | teensy/teensy_hal.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/teensy/teensy_hal.h b/teensy/teensy_hal.h index ffbb70bcc3..53228951c2 100644 --- a/teensy/teensy_hal.h +++ b/teensy/teensy_hal.h @@ -5,7 +5,7 @@ void assert_failed(uint8_t* file, uint32_t line); #else #define assert_param(expr) ((void)0) -#endif /* USE_FULL_ASSERT */ +#endif /* USE_FULL_ASSERT */ #define FTM0 ((FTM_TypeDef *)&FTM0_SC) #define FTM1 ((FTM_TypeDef *)&FTM1_SC) @@ -113,25 +113,20 @@ typedef struct { #define GPIO_AF6_I2C1 6 #define GPIO_AF7_FTM1 7 - -__attribute__(( always_inline )) static inline void __WFI(void) -{ +__attribute__(( always_inline )) static inline void __WFI(void) { __asm volatile ("wfi"); } -__attribute__(( always_inline )) static inline uint32_t __get_PRIMASK(void) -{ +__attribute__(( always_inline )) static inline uint32_t __get_PRIMASK(void) { uint32_t result; __asm volatile ("MRS %0, primask" : "=r" (result)); return(result); } -__attribute__(( always_inline )) static inline void __set_PRIMASK(uint32_t priMask) -{ +__attribute__(( always_inline )) static inline void __set_PRIMASK(uint32_t priMask) { __asm volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); } - uint32_t HAL_GetTick(void); void HAL_Delay(uint32_t Delay); |