STC15W408AS library 0.9.0
|
#include <sys.h>
#include <bits.h>
#include <interrupt.h>
#include <stdint.h>
#include <stdbool.h>
#include <timer_structs.h>
Go to the source code of this file.
Macros | |
init | |
Timer initializaion functions | |
#define | timer2_mode0_12T_init() |
Initialize mode0 12T for timer2. More... | |
#define | timer2_mode0_1T_init() |
Initialize mode0 1T for timer2. More... | |
config | |
Timer configuration functions | |
#define | timer2_mode0_enable_P30_output() (bit_set(INT_CLKO, SBIT2)) |
Enable output of meander with timer times on P3.0 pin. More... | |
#define | timer2_mode0_disable_P30_output() (bit_clr(INT_CLKO, CBIT2)) |
Disable output of meander with timer times on P3.0 pin. | |
#define | is_timer2_mode0_P30_output_enabled() (test_if_bit_set(INT_CLKO, SBIT2)) |
run in async mode | |
Timer run/stop/reload functions | |
#define | timer2_mode0_start(ticks) |
Run timer2 mode0 with interrupt support. More... | |
#define | timer2_mode0_direct_start(th0, tl0) |
Run timer2 mode0 with direct set of TH0 and TL0 registers. More... | |
#define | timer2_mode0_stop() |
Stop timer2 mode0. More... | |
#define | is_timer2_mode0_started() (test_if_bit_set(AUXR, SBIT4)) |
Get timer2 started status. More... | |
#define | timer2_mode0_reload(ticks) |
Reload timer2 ticks on the fly. More... | |
#define | timer2_mode0_direct_reload(th2, tl2) |
Reload timer2 T2H and T2L registers on the fly. More... | |
baud rate enable/disable | |
Select timer2 as UART1 baud rate generator | |
#define | timer2_mode0_enable_as_uart1_baud_rate() (bit_set(AUXR, SBIT0)) |
Select timer2 as uart1 baud rate generator. More... | |
#define | timer2_mode0_disable_as_uart1_baud_rate() (bit_clr(AUXR, CBIT0)) |
Unselect timer2 as uart1 baud rate generator. More... | |
#define | is_timer2_mode0_as_uart1_baud_rate_enabled() (test_if_bit_set(AUXR, SBIT0)) |
Is timer0 used as UART1 baud rate generator? More... | |