Timed components that depend on the microcontroller clock such as timers, communication and conversion components, may support speed modes defined in the processor component (in EXPERT view level). The event BeforeNewSpeed is invoked before the speed mode changes and AfterNewSpeed is invoked after the speed mode changes. Speed mode may be changed using the processor component methods SetHigh, SetLow, or SetSlow.
EVENT.C
int changing_speed_mode = 0;
void B1_BeforeNewSpeed(void)
{
++changing_speed_mode;
}
void B1_AfterNewSpeed(void)
{
--changing_speed_mode;
}