Hello This is a small patch that enables redefinition of HAL_DELAY_US at variant or platform level.
An example use case is substitution of hal_delay_us() with "equivalent" that provides sub microsecond polling (for devices that require low latency response). Best regards Ilija
Index: hal/cortexm/arch/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/cortexm/arch/current/ChangeLog,v retrieving revision 1.11 diff -u -5 -r1.11 ChangeLog --- hal/cortexm/arch/current/ChangeLog 17 May 2010 11:38:29 -0000 1.11 +++ hal/cortexm/arch/current/ChangeLog 13 Dec 2010 12:25:48 -0000 @@ -1,5 +1,9 @@ +2010-12-12 Ilija Kocho <[email protected]> + + * include/hal_intr.h: Conditional define of HAL_DELAY_US(). + 2010-05-17 Spencer Oliver <[email protected]> * include/hal_intr.h (HAL_INTERRUPT_STACK_CALL_PENDING_DSRS): * src/hal_misc.c (hal_reset_vsr): Add 0 argument to SWI. Index: hal/cortexm/arch/current/include/hal_intr.h =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/cortexm/arch/current/include/hal_intr.h,v retrieving revision 1.5 diff -u -5 -r1.5 hal_intr.h --- hal/cortexm/arch/current/include/hal_intr.h 17 May 2010 11:38:30 -0000 1.5 +++ hal/cortexm/arch/current/include/hal_intr.h 13 Dec 2010 12:25:48 -0000 @@ -357,12 +357,13 @@ //========================================================================== // HAL_DELAY_US(). // __externC void hal_delay_us( cyg_int32 us ); +#if !defined HAL_DELAY_US #define HAL_DELAY_US( __us ) hal_delay_us( __us ) - +#endif //========================================================================== // Reset. // // This uses the SYSRESETREQ bit in the Cortex-M3 NVIC.
