Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: 'SREG' was not declared in this scope #1

Open
huster-songtao opened this issue May 4, 2024 · 0 comments
Open

error: 'SREG' was not declared in this scope #1

huster-songtao opened this issue May 4, 2024 · 0 comments

Comments

@huster-songtao
Copy link

FQBN: esp32:esp32:XIAO_ESP32C3
Using board 'XIAO_ESP32C3' from platform in folder: C:\Users\tao\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.15
Using core 'esp32' from platform in folder: C:\Users\tao\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.15

D:\Arduino\github\FastLED-RGBW\CRGBW\SK6812_io.cpp: In member function 'void SK6812::sendarray_mask(uint8_t*, uint16_t, uint8_t, uint8_t*, uint8_t*)':
D:\Arduino\github\FastLED-RGBW\CRGBW\SK6812_io.cpp:71:13: error: 'SREG' was not declared in this scope
sreg_prev=SREG;
^~~~
In file included from D:\Arduino\github\FastLED-RGBW\CRGBW\SK6812.h:6,
from D:\Arduino\github\FastLED-RGBW\CRGBW\SK6812.cpp:1:
D:\Arduino\github\FastLED-RGBW\CRGBW\SK6812.cpp: In member function 'void SK6812::set_output(uint8_t)':
C:\Users\tao\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.15\cores\esp32/Arduino.h:114:70: error: cannot convert 'volatile uint32_t*' {aka 'volatile long unsigned int*'} to 'const volatile uint8_t*' {aka 'const volatile unsigned char*'} in assignment
#define portOutputRegister(port) ((volatile uint32_t*)GPIO_OUT_REG)
^
D:\Arduino\github\FastLED-RGBW\CRGBW\SK6812.cpp:18:10: note: in expansion of macro 'portOutputRegister'
_port = portOutputRegister(digitalPinToPort(pin));
^~~~~~~~~~~~~~~~~~
C:\Users\tao\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.15\cores\esp32/Arduino.h:116:73: error: cannot convert 'volatile uint32_t*' {aka 'volatile long unsigned int*'} to 'volatile uint8_t*' {aka 'volatile unsigned char*'} in assignment
#define portModeRegister(port) ((volatile uint32_t*)GPIO_ENABLE_REG)
^
D:\Arduino\github\FastLED-RGBW\CRGBW\SK6812.cpp:19:14: note: in expansion of macro 'portModeRegister'
_port_reg = portModeRegister(digitalPinToPort(pin));
^~~~~~~~~~~~~~~~

exit status 1

Compilation error: 'SREG' was not declared in this scope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant