declared wait()-routines as inline void volatile since gcc decided to optimize out them sometimes. Do we need __attribute__(always_inline) ?
This commit is contained in:
@@ -26,7 +26,7 @@ extern volatile long _VRAM; /* start address of video ram from linker script */
|
||||
* wait for the specified number of us on slice timer 0. Replaces the original routines that had
|
||||
* the number of useconds to wait for hardcoded in their name.
|
||||
*/
|
||||
inline void wait(uint32_t us)
|
||||
inline volatile void wait(uint32_t us)
|
||||
{
|
||||
uint32_t target = MCF_SLT_SCNT(0) - (us * 132);
|
||||
|
||||
@@ -37,7 +37,7 @@ inline void wait(uint32_t us)
|
||||
* the same as above, with a checker function which gets called while
|
||||
* busy waiting and allows for an early return if it returns true
|
||||
*/
|
||||
inline bool waitfor(uint32_t us, int (*condition)(void))
|
||||
inline volatile bool waitfor(volatile uint32_t us, int (*condition)(void))
|
||||
{
|
||||
uint32_t target = MCF_SLT_SCNT(0) - (us * 132);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user