mirror of
https://github.com/Makuna/NeoPixelBus.git
synced 2025-08-02 10:24:27 +02:00
merge changes from CORE3 branch to fix compile issues for H2/P4 (#887)
This commit is contained in:
@@ -36,7 +36,7 @@ static inline uint32_t getCycleCount(void)
|
|||||||
{
|
{
|
||||||
uint32_t ccount;
|
uint32_t ccount;
|
||||||
|
|
||||||
#if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2)
|
#if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||||
__asm__ __volatile__("csrr %0,0x7e2":"=r" (ccount));
|
__asm__ __volatile__("csrr %0,0x7e2":"=r" (ccount));
|
||||||
//ccount = esp_cpu_get_ccount();
|
//ccount = esp_cpu_get_ccount();
|
||||||
#else
|
#else
|
||||||
@@ -46,7 +46,8 @@ static inline uint32_t getCycleCount(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Interrupt lock class, used for RAII interrupt disabling
|
// Interrupt lock class, used for RAII interrupt disabling
|
||||||
class InterruptLock {
|
class InterruptLock
|
||||||
|
{
|
||||||
#if defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP32)
|
||||||
portMUX_TYPE updateMux;
|
portMUX_TYPE updateMux;
|
||||||
#endif
|
#endif
|
||||||
@@ -114,13 +115,13 @@ bool IRAM_ATTR neoEspBitBangWriteSpacingPixels(const uint8_t* pixels,
|
|||||||
volatile uint32_t* setRegister;
|
volatile uint32_t* setRegister;
|
||||||
volatile uint32_t* clearRegister;
|
volatile uint32_t* clearRegister;
|
||||||
|
|
||||||
#if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2)
|
#if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||||
if (pin < 32)
|
if (pin < 32)
|
||||||
{
|
{
|
||||||
setRegister = &GPIO.out_w1ts.val;
|
setRegister = &GPIO.out_w1ts.val;
|
||||||
clearRegister = &GPIO.out_w1tc.val;
|
clearRegister = &GPIO.out_w1tc.val;
|
||||||
}
|
}
|
||||||
#if !defined(CONFIG_IDF_TARGET_ESP32C3)
|
#if !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32H2)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setRegister = &GPIO.out1_w1ts.val;
|
setRegister = &GPIO.out1_w1ts.val;
|
||||||
|
Reference in New Issue
Block a user