diff --git a/cores/arduino/delay.c b/cores/arduino/delay.c index ea000abb0..19aed212f 100644 --- a/cores/arduino/delay.c +++ b/cores/arduino/delay.c @@ -26,7 +26,7 @@ extern "C" { /** Tick Counter united by ms */ static volatile uint32_t _ulTickCount=0 ; -uint32_t millis( void ) +unsigned long millis( void ) { // todo: ensure no interrupts return _ulTickCount ; @@ -36,7 +36,7 @@ uint32_t millis( void ) // Theory: repeatedly take readings of SysTick counter, millis counter and SysTick interrupt pending flag. // When it appears that millis counter and pending is stable and SysTick hasn't rolled over, use these // values to calculate micros. If there is a pending SysTick, add one to the millis counter in the calculation. -uint32_t micros( void ) +unsigned long micros( void ) { uint32_t ticks, ticks2; uint32_t pend, pend2; @@ -61,7 +61,7 @@ uint32_t micros( void ) // a runtime multiplication and shift, saving a few cycles } -void delay( uint32_t ms ) +void delay( unsigned long ms ) { if ( ms == 0 ) { diff --git a/cores/arduino/delay.h b/cores/arduino/delay.h index 1df845bd7..be3a93c65 100644 --- a/cores/arduino/delay.h +++ b/cores/arduino/delay.h @@ -33,7 +33,7 @@ extern "C" { * * \return Number of milliseconds since the program started (uint32_t) */ -extern uint32_t millis( void ) ; +extern unsigned long millis( void ) ; /** * \brief Returns the number of microseconds since the Arduino board began running the current program. @@ -45,7 +45,7 @@ extern uint32_t millis( void ) ; * * \note There are 1,000 microseconds in a millisecond and 1,000,000 microseconds in a second. */ -extern uint32_t micros( void ) ; +extern unsigned long micros( void ) ; /** * \brief Pauses the program for the amount of time (in miliseconds) specified as parameter. @@ -53,15 +53,15 @@ extern uint32_t micros( void ) ; * * \param dwMs the number of milliseconds to pause (uint32_t) */ -extern void delay( uint32_t dwMs ) ; +extern void delay( unsigned long dwMs ) ; /** * \brief Pauses the program for the amount of time (in microseconds) specified as parameter. * * \param dwUs the number of microseconds to pause (uint32_t) */ -static __inline__ void delayMicroseconds( uint32_t ) __attribute__((always_inline, unused)) ; -static __inline__ void delayMicroseconds( uint32_t usec ) +static __inline__ void delayMicroseconds( unsigned int ) __attribute__((always_inline, unused)) ; +static __inline__ void delayMicroseconds( unsigned int usec ) { if ( usec == 0 ) {