mirror of
https://github.com/PaulStoffregen/Tlc5940
synced 2025-09-27 18:12:22 +02:00
Add support for Teensy 4
This commit is contained in:
@@ -50,10 +50,17 @@
|
||||
#define disable_XLAT_pulses() TCCR1A = _BV(COM1B1)
|
||||
|
||||
#elif defined(__arm__) && defined(TEENSYDUINO)
|
||||
#if defined(__IMXRT1062__)
|
||||
#define set_XLAT_interrupt() FLEXPWM4_SM2STS = FLEXPWM_SMSTS_RF; FLEXPWM4_SM2INTEN = FLEXPWM_SMINTEN_RIE;
|
||||
#define clear_XLAT_interrupt() FLEXPWM4_SM2INTEN = 0;
|
||||
#define enable_XLAT_pulses() CORE_PIN3_CONFIG = 1;
|
||||
#define disable_XLAT_pulses() CORE_PIN3_CONFIG = 5;
|
||||
#else
|
||||
#define set_XLAT_interrupt() FTM1_SC = FTM_SC_CLKS(1) | FTM_SC_CPWMS | FTM_SC_TOIE | (FTM1_SC & FTM_SC_PS(7))
|
||||
#define clear_XLAT_interrupt() FTM1_SC = FTM_SC_CLKS(1) | FTM_SC_CPWMS | (FTM1_SC & FTM_SC_PS(7))
|
||||
#define enable_XLAT_pulses() CORE_PIN3_CONFIG = PORT_PCR_MUX(3)|PORT_PCR_DSE|PORT_PCR_SRE
|
||||
#define disable_XLAT_pulses() CORE_PIN3_CONFIG = PORT_PCR_MUX(1)|PORT_PCR_DSE|PORT_PCR_SRE
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user