Hi, when looking at macro expansion of chThdSleepMilliseconds I always see ((uint32_t)10000) in
chThdSleep(((systime_t)(((((uint32_t)(500)) * \
((uint32_t)10000)) + 999UL) / 1000UL)))
independently of CH_CFG_ST_FREQUENCY settings. Is that ok?
Macro Expansion chThdSleepMilliseconds
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Macro Expansion chThdSleepMilliseconds
Hi,
That (uint32_t)10000) is CH_CFG_ST_FREQUENCY, expanded.
Giovanni
Code: Select all
#define MS2ST(msec) \
((systime_t)(((((uint32_t)(msec)) * \
((uint32_t)CH_CFG_ST_FREQUENCY)) + 999UL) / 1000UL))
That (uint32_t)10000) is CH_CFG_ST_FREQUENCY, expanded.
Giovanni
Re: Macro Expansion chThdSleepMilliseconds
I know, but it shows 10000 even the CH_CFG_ST_FREQUENCY is set to 3000, for example (ie VLDiscovery demo).
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Macro Expansion chThdSleepMilliseconds
Ok, after "Index->Freshen All Files" it starts to copy the actual value of CH_CFG_ST_FREQUENCY into the chThdSleepMilliseconds macro expansion.
Tkanks!
Tkanks!
Who is online
Users browsing this forum: No registered users and 11 guests