STC15W408AS library 0.10.0
Loading...
Searching...
No Matches
Macros
counter0_mode1.h File Reference
#include <stdint.h>
#include <assert.h>
#include <interrupt.h>
Include dependency graph for counter0_mode1.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define T0   P34
 T0 pin definition.
 
init

Counter initializaion functions

#define counter0_mode1_init()
 Initialize mode1 for counter0.
 
start/stop

Counter0 start/stop functions

#define counter0_mode1_start(value)
 Starts Counter 0 in Mode 1 with a specified initial value.
 
#define is_counter0_mode1_started()   (TR0 == 1)
 Check if counter0 is started.
 
#define counter0_mode1_stop()
 Stop counter0.
 
read

Counter read value functions

#define counter0_mode1_get_value()   ((((uint16_t) TH0) << 8) | TL0)
 Get counter0 value in mode1.