|
STC15W408AS library 0.13.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_mode1_12T_init() |
| Initialize mode1 12T for timer0. | |
| #define | timer0_mode1_1T_init() |
| Initialize mode1 1T for timer0. | |
config | |
Timer configuration functions | |
| #define | timer0_mode1_close_gate() (bit_set(TMOD, SBIT3)) |
| Close timer starting gate. | |
| #define | timer0_mode1_open_gate() (bit_clr(TMOD, CBIT3)) |
| Open timer starting gate. | |
| #define | is_timer0_mode1_gate_opened() (test_if_bit_cleared(TMOD, SBIT3)) |
| Get timer starting gate state. | |
run in async mode | |
Timer run/stop/reload functions | |
| #define | timer0_mode1_start(ticks) |
| Run timer0 in mode1. | |
| #define | timer0_mode1_direct_start(th0, tl0) |
| Run timer0 in mode1 with direct set of TH0 and TL0 registers. | |
| #define | timer0_mode1_stop() |
| Stop timer0. | |
| #define | is_timer0_mode1_started() (TR0 == 1 && (is_timer0_mode1_gate_opened() || INT0 == 1)) |
| Get timer0 mode1 started status. | |
run in sync mode | |
Timer run once functions | |
| #define | timer0_mode1_delay(ticks) |
| Run timer0 mode1 once and wait with program flow blocking timer not finished. | |