STC15W408AS library 0.10.0
|
#include <assert.h>
#include <stdint.h>
#include <stdbool.h>
#include <interrupt.h>
#include <bits.h>
Go to the source code of this file.
Macros | |
#define | T2 P31 |
T2 pin definition. | |
init | |
Counter initializaion functions | |
#define | counter2_mode0_init() |
Initialize mode0 for counter2. | |
run | |
Counter run/stop/reload functions | |
#define | counter2_mode0_start(value) |
Run counter2. | |
#define | counter2_mode0_stop() |
Stop counter2. | |
#define | is_counter2_mode0_started() (test_if_bit_set(_AUXR, SBIT4)) |
Get counter2 mode0 started status. | |
read/write | |
Counter2 get and set value functions | |
#define | counter2_mode0_get_value() ((((uint16_t) T2H) << 8) | T2L) |
get counter2 value in mode0 | |
#define | counter2_mode0_set_value(value) |
set counter2 value in mode0 | |
config | |
Counter2 pin output and gate config functions | |
#define | counter2_mode0_enable_P30_output() (bit_set(INT_CLKO, SBIT2)) |
enable output to P3.0 | |
#define | counter2_mode0_disable_P30_output() (bit_clr(INT_CLKO, CBIT2)) |
disable output to P3.0 | |
#define | is_counter2_mode0_P30_output_enabled() (test_if_bit_set(INT_CLKO, SBIT2)) |
get pin P3.0 output state to P3.0 | |