* Set timers on and off. * * @param timer The timer to switch. * @param set True sets the timer on, false sets it off. * @return True if timer was set, false if it was not set. */
| 354 | * @return True if timer was set, false if it was not set. |
| 355 | */ |
| 356 | bool Timer_SetTimer(TimerType timer, bool set) |
| 357 | { |
| 358 | uint8 t; |
| 359 | bool ret; |
| 360 | |
| 361 | t = (1 << (timer - 1)); |
| 362 | ret = (s_timersActive & t) != 0; |
| 363 | |
| 364 | if (set) { |
| 365 | s_timersActive |= t; |
| 366 | } else { |
| 367 | s_timersActive &= ~t; |
| 368 | } |
| 369 | |
| 370 | return ret; |
| 371 | } |
| 372 | |
| 373 | /** |
| 374 | * Sleep for an amount of ticks. |
no outgoing calls
no test coverage detected