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

[Bugfix] Correct mis-matched function signatures #377

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
Doxyfile*
doxygen_sqlite3.db
html
.vscode/*
4 changes: 2 additions & 2 deletions Adafruit_NeoPixel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,10 @@ void Adafruit_NeoPixel::rp2040Show(uint8_t pin, uint8_t *pixels, uint32_t numBy

#if defined(ESP8266)
// ESP8266 show() is external to enforce ICACHE_RAM_ATTR execution
extern "C" IRAM_ATTR void espShow(uint16_t pin, uint8_t *pixels,
extern "C" IRAM_ATTR void espShow(int16_t pin, uint8_t *pixels,
uint32_t numBytes, uint8_t type);
#elif defined(ESP32)
extern "C" void espShow(uint16_t pin, uint8_t *pixels, uint32_t numBytes,
extern "C" void espShow(int16_t pin, uint8_t *pixels, uint32_t numBytes,
uint8_t type);
#endif // ESP8266

Expand Down
4 changes: 2 additions & 2 deletions esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#ifdef HAS_ESP_IDF_5

void espShow(uint8_t pin, uint8_t *pixels, uint32_t numBytes, boolean is800KHz) {
void espShow(int16_t pin, uint8_t *pixels, uint32_t numBytes, boolean is800KHz) {
rmt_data_t led_data[numBytes * 8];

if (!rmtInit(pin, RMT_TX_MODE, RMT_MEM_NUM_BLOCKS_1, 10000000)) {
Expand Down Expand Up @@ -131,7 +131,7 @@ static void IRAM_ATTR ws2812_rmt_adapter(const void *src, rmt_item32_t *dest, si
*item_num = num;
}

void espShow(uint8_t pin, uint8_t *pixels, uint32_t numBytes, boolean is800KHz) {
void espShow(int16_t pin, uint8_t *pixels, uint32_t numBytes, boolean is800KHz) {
// Reserve channel
rmt_channel_t channel = ADAFRUIT_RMT_CHANNEL_MAX;
for (size_t i = 0; i < ADAFRUIT_RMT_CHANNEL_MAX; i++) {
Expand Down
4 changes: 2 additions & 2 deletions esp8266.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ static inline uint32_t _getCycleCount(void) {

#ifdef ESP8266
IRAM_ATTR void espShow(
uint8_t pin, uint8_t *pixels, uint32_t numBytes, __attribute__((unused)) boolean is800KHz) {
int16_t pin, uint8_t *pixels, uint32_t numBytes, __attribute__((unused)) boolean is800KHz) {
#else
void espShow(
uint8_t pin, uint8_t *pixels, uint32_t numBytes, boolean is800KHz) {
int16_t pin, uint8_t *pixels, uint32_t numBytes, boolean is800KHz) {
#endif

#define CYCLES_800_T0H (F_CPU / 2500001) // 0.4us
Expand Down
2 changes: 1 addition & 1 deletion kendyte_k210.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "sysctl.h"

void k210Show(
uint8_t pin, uint8_t *pixels, uint32_t numBytes, boolean is800KHz)
int16_t pin, uint8_t *pixels, uint32_t numBytes, boolean is800KHz)
{

#define CYCLES_800_T0H (sysctl_clock_get_freq(SYSCTL_CLOCK_CPU) / 2500000) // 0.4us
Expand Down
Loading