forked from Makuna/NeoPixelBus
Small tuning
This commit is contained in:
@@ -74,39 +74,41 @@ void NeoPixelBus::Begin(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ESP8266)
|
#if defined(ESP8266)
|
||||||
#pragma optimize( "", off )
|
|
||||||
|
|
||||||
void send_ws_0_800(uint8_t gpio) {
|
void ICACHE_FLASH_ATTR send_ws_0_800(uint8_t gpio) {
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
i = 4; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, 1 << gpio);
|
i = 4; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, 1 << gpio);
|
||||||
i = 6; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, 1 << gpio);
|
i = 7; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, 1 << gpio);
|
||||||
}
|
}
|
||||||
|
|
||||||
void send_ws_1_800(uint8_t gpio) {
|
void ICACHE_FLASH_ATTR send_ws_1_800(uint8_t gpio) {
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
i = 9; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, 1 << gpio);
|
i = 9; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, 1 << gpio);
|
||||||
i = 2; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, 1 << gpio);
|
i = 2; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, 1 << gpio);
|
||||||
}
|
}
|
||||||
|
|
||||||
void send_ws_0_400(uint8_t gpio) {
|
void ICACHE_FLASH_ATTR send_ws_0_400(uint8_t gpio) {
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
i = 8; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, 1 << gpio);
|
i = 8; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, 1 << gpio);
|
||||||
i = 12; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, 1 << gpio);
|
i = 12; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, 1 << gpio);
|
||||||
}
|
}
|
||||||
|
|
||||||
void send_ws_1_400(uint8_t gpio) {
|
void ICACHE_FLASH_ATTR send_ws_1_400(uint8_t gpio) {
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
i = 18; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, 1 << gpio);
|
i = 18; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, 1 << gpio);
|
||||||
i = 4; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, 1 << gpio);
|
i = 4; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, 1 << gpio);
|
||||||
}
|
}
|
||||||
#pragma optimize( "", on )
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(ESP8266)
|
#if defined(ESP8266)
|
||||||
#pragma optimize( "", off )
|
|
||||||
#endif
|
void ICACHE_FLASH_ATTR NeoPixelBus::Show(void)
|
||||||
|
|
||||||
|
#else
|
||||||
void NeoPixelBus::Show(void)
|
void NeoPixelBus::Show(void)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (!_pixels)
|
if (!_pixels)
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user