mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
Timer number is now declared in my_user_config.h
This commit is contained in:
parent
76c5be7634
commit
404db7965e
@ -1037,6 +1037,7 @@
|
||||
#define USE_DALI // Add support for DALI
|
||||
#define DALI_IN_INVERT 0 // DALI RX inverted ?
|
||||
#define DALI_OUT_INVERT 0 // DALI TX inverted ?
|
||||
#define DALI_TIMER 0 // ESP32 hardware timer number 0-3 !!! timer 3 used in xdrv_10_scripter.ino !!!
|
||||
|
||||
//#define USE_SONOFF_SPM // Add support for ESP32 based Sonoff Smart Stackable Power Meter (+11k code)
|
||||
//#define USE_DISPLAY_TM1621_SONOFF // Add support for TM1621 dsiplay driver used by Sonoff POWR3xxD and THR3xxD
|
||||
|
@ -31,6 +31,10 @@
|
||||
|
||||
#define XDRV_89 89
|
||||
|
||||
#ifndef DALI_TIMER
|
||||
#define DALI_TIMER 0 // Default timer
|
||||
#endif
|
||||
|
||||
#define BROADCAST_DP 0b11111110 // 0xFE
|
||||
#define DALI_TOPIC "DALI"
|
||||
|
||||
@ -53,19 +57,6 @@ enum DALI_Commands { // commands for Console
|
||||
CMND_DALI_DIM,
|
||||
};
|
||||
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
// Data variables
|
||||
// uint16_t send_dali_data; // data to send to DALI bus
|
||||
// uint16_t received_dali_data; // data received from DALI bus
|
||||
// Processing variables
|
||||
// uint8_t flag; // DALI status flag
|
||||
// uint8_t bit_count; // nr of rec/send bits
|
||||
// uint16_t tick_count; // nr of ticks of the timer
|
||||
|
||||
// bool bit_value; // value of actual bit
|
||||
// bool actual_val; // bit value in this tick of timer
|
||||
// bool former_val; // bit value in previous tick of timer
|
||||
|
||||
struct DALI {
|
||||
// Data variables
|
||||
uint16_t send_dali_data; // data to send to DALI bus
|
||||
@ -390,7 +381,7 @@ void DaliPreInit() {
|
||||
digitalWrite(Pin(GPIO_DALI_TX), HIGH);
|
||||
pinMode(Pin(GPIO_DALI_RX), INPUT);
|
||||
|
||||
DALI_timer = timerBegin(0, 13, true);
|
||||
DALI_timer = timerBegin(DALI_TIMER, 13, true);
|
||||
timerAttachInterrupt(DALI_timer, &DALI_Tick_Handler, true);
|
||||
timerAlarmWrite(DALI_timer, 641, true);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user