Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

Commit e4723d4

Browse files
authored
Add files via upload
1 parent 8f2d309 commit e4723d4

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

src/ESP8266TimerInterrupt.h

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -47,41 +47,13 @@ enum TIM_DIV_ENUM {
4747
TIM_DIV256 = 3 // 312.5 / 625 Khz (1 tick = 3.2 / 1.6 us - 26843542.4 us max)
4848
};
4949
50-
5150
//timer int_types
5251
#define TIM_EDGE 0
5352
#define TIM_LEVEL 1
5453
//timer reload values
5554
#define TIM_SINGLE 0 //on interrupt routine you need to write a new value to start the timer again
5655
#define TIM_LOOP 1 //on interrupt the counter will start with the same value again
5756
58-
#define timer1_read() (T1V)
59-
#define timer1_enabled() ((T1C & (1 << TCTE)) != 0)
60-
#define timer1_interrupted() ((T1C & (1 << TCIS)) != 0)
61-
62-
typedef void(*timercallback)(void);
63-
64-
void timer1_isr_init(void);
65-
void timer1_enable(uint8_t divider, uint8_t int_type, uint8_t reload);
66-
void timer1_disable(void);
67-
void timer1_attachInterrupt(timercallback userFunc);
68-
void timer1_detachInterrupt(void);
69-
void timer1_write(uint32_t ticks); //maximum ticks 8388607
70-
71-
// timer0 is a special CPU timer that has very high resolution but with
72-
// limited control.
73-
// it uses CCOUNT (ESP.GetCycleCount()) as the non-resetable timer counter
74-
// it does not support divide, type, or reload flags
75-
// it is auto-disabled when the compare value matches CCOUNT
76-
// it is auto-enabled when the compare value changes
77-
#define timer0_interrupted() (ETS_INTR_PENDING() & (_BV(ETS_COMPARE0_INUM)))
78-
#define timer0_read() ((__extension__({uint32_t count;__asm__ __volatile__("esync; rsr %0,ccompare0":"=a" (count));count;})))
79-
#define timer0_write(count) __asm__ __volatile__("wsr %0,ccompare0; esync"::"a" (count) : "memory")
80-
81-
void timer0_isr_init(void);
82-
void timer0_attachInterrupt(timercallback userFunc);
83-
void timer0_detachInterrupt(void);
84-
8557
*/
8658

8759
// ESP8266 only has one usable timer1, max count is only 8,388,607. So to get longer time, we use max available 256 divider

0 commit comments

Comments
 (0)