STC15W408AS library 0.9.0
|
#include <stdint.h>
#include <frequency.h>
#include <timer2_mode0.h>
#include <timer_common.h>
#include <timer_to_ms_common.h>
Go to the source code of this file.
Macros | |
tick to frequency conversions | |
Timer ticks to overlow frequency and vice versa convertions | |
#define | timer2_uint16_ticks_to_freq100(ticks) (timer_uint16_ticks_to_freq100(ticks, get_timer2_clock_divider(), get_frequency_divider_scale())) |
Convert ticks to timer frequency for timer2 multiplied by 100. More... | |
#define | timer2_frequency_to_ticks_unsafe(frequency) (timer_frequency_to_ticks_unsafe(frequency, get_timer2_clock_divider(), get_frequency_divider_scale())) |
Unsafe approximation timer2 frequency corresponding to ticks. More... | |
#define | timer2_ticks_to_ms_usafe(ticks) (timer_ticks_to_ms_usafe(ticks, get_timer2_clock_divider(), get_frequency_divider_scale())) |
Convert ticks count to ms. More... | |
UART baud rate to ticks | |
UART baud rate to timer ticks to overlow frequency and vice versa convertions | |
#define | timer2_mode0_baudrate_to_ticks(uart_baudrate) ((get_master_clock_frequency() >> get_frequency_divider_scale())/4/uart_baudrate) |
Calculate timer2 ticks for UART baudrate. More... | |
#define | timer2_ms_to_ticks_usafe(ms) (timer_ms_to_ticks_usafe(ms, get_timer2_clock_divider())) |
Convert milliseconds to timer2 ticks. More... | |