STC15W408AS library 0.17.0
Loading...
Searching...
No Matches
timer0_mode1_to_ms.h File Reference
#include <stdint.h>
#include <frequency.h>
#include <timer0_mode1.h>
#include <timer_common.h>
#include <timer_to_ms_common.h>
Include dependency graph for timer0_mode1_to_ms.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

frequency and ticks

Timer ticks to frequency and vice versa convertions

#define timer0_mode1_ticks_to_Hz(ticks)   (timer_ticks_to_Hz(ticks, get_timer0_clock_divider(), get_frequency_divider_scale()))
 Converts ticks to timer overflow frequency for timer0 mode1.
 
#define timer0_mode1_Hz_to_ticks(frequency)   (timer_Hz_to_ticks(frequency, get_timer0_clock_divider(), get_frequency_divider_scale()))
 Converts frequency to ticks for timer0 mode1.
 
#define timer0_mode1_ticks_to_ms(ticks)   (timer_16bit_ticks_to_ms(ticks, get_timer0_clock_divider(), get_frequency_divider_scale()))
 Convert ticks count to ms.
 
#define timer0_mode1_ms_to_ticks(ms)   (timer_ms_to_ticks(ms, get_timer0_clock_divider(), get_frequency_divider_scale()))
 Convert milliseconds to timer0 ticks.
 
timer start for frequency and ms

Start Timer for ms or frequency

#define timer0_mode1_start_ms(ms)
 Start timer0 in mode 1 with ms duration.
 
#define timer0_mode1_start_Hz(freq)
 Start timer0 in mode 1 with Hz frequency.
 
timer delay ms

Delay using timer

#define timer0_mode1_delay_ms(ms)
 Run timer0 mode1 once and wait with program flow blocking timer not finished.