STC15W408AS library 0.9.0
timer0_to_ms.h File Reference
#include <stdint.h>
#include <frequency.h>
#include <timer0_mode0.h>
#include <timer_common.h>
#include <timer_to_ms_common.h>
Include dependency graph for timer0_to_ms.h:

Go to the source code of this file.

Macros

frequency and ticks

Timer ticks to frequency and vice versa convertions

#define timer0_uint16_ticks_to_freq100(ticks)   (timer_uint16_ticks_to_freq100(ticks, get_timer0_clock_divider(), get_frequency_divider_scale()))
 Convert ticks to timer frequency for timer0 multiplied by 100. More...
 
#define timer0_frequency_to_ticks_unsafe(frequency)   (timer_frequency_to_ticks_unsafe(frequency, get_timer0_clock_divider(), get_frequency_divider_scale()))
 Unsafe approximation timer0 frequency corresponding to ticks. More...
 
#define timer0_ticks_to_ms_usafe(ticks)   (timer_ticks_to_ms_usafe(ticks, get_timer0_clock_divider(), get_frequency_divider_scale()))
 Convert ticks count to ms. More...
 
#define timer0_ms_to_ticks_usafe(ms)   (timer_ms_to_ticks_usafe(ms, get_timer0_clock_divider()))
 Convert milliseconds to timer0 ticks. More...