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 | |
#define | INT0 P32 |
INT0 pin definition. | |
init | |
Timer initializaion functions | |
#define | timer0_mode2_12T_init() |
Initialize mode2 12T for timer0. More... | |
#define | timer0_mode2_1T_init() |
Initialize mode2 1T for timer0. More... | |
config | |
Timer configuration functions | |
#define | timer0_mode2_enable_P35_output() (bit_set(INT_CLKO, SBIT0)) |
Enable P35 meander output. | |
#define | timer0_mode2_disable_P35_output() (bit_clr(INT_CLKO, CBIT0)) |
Disable P35 meander output. | |
#define | is_timer0_mode2_P35_output_enabled() (test_if_bit_set(INT_CLKO, SBIT0)) |
Get output to pin P3.5 output flag enabled value. More... | |
#define | timer0_mode2_close_gate() (bit_set(TMOD, SBIT3)) |
Close timer starting gate. More... | |
#define | timer0_mode2_open_gate() (bit_clr(TMOD, CBIT3)) |
Open timer starting gate. More... | |
#define | is_timer0_mode2_gate_opened() (test_if_bit_cleared(TMOD, SBIT3)) |
Get timer starting gate state. More... | |
run in async mode | |
Timer run/stop/reload functions | |
#define | timer0_mode2_reload(ticks) |
Reload timer0 mode2 ticks on the fly. More... | |
#define | timer0_mode2_direct_reload(th0) (TH0 = th0) |
Reload timer0 mode2 TL0 on the fly. More... | |
#define | timer0_mode2_start(ticks) |
Run timer0. More... | |
#define | timer0_mode2_direct_start(th0) |
Run timer0 with direct set timer value. More... | |
#define | timer0_mode2_stop() |
Stop timer0. More... | |
#define | is_timer0_mode2_started() (TR0 == 1 && (is_timer0_mode2_gate_opened() || INT0 == 1)) |
Get timer0 mode2 started status. More... | |
run in sync mode | |
Timer run once functions | |
#define | timer0_mode2_delay(ticks) |
Run timer0 mode2 once and wait with program flow blocking timer not finished. More... | |