#define HAL_READ_UINT16_STRING( _register_, _buf_, _count_) \
CYG_MACRO_START \
cyg_count32 _i_; \
for( _i_ = 0; _i_ < (_count_); _i_++) \
(_buf_)[_i_] = ((volatile CYG_WORD16 *)(_register_))[_i_]; \
CYG_MACRO_END
in the macro the tempory variable **_i_** has been declared, so if this
macro has been called twice inside one function will it cause any variable
redefinition (_i_) problem?e.g.
main()
{
HAL_READ_UINT16_STRING();
HAL_READ_UINT16_STRING();
}
There won't be any problem because in the code in question, the scopes of two
_i_ are different.