forked from Makuna/NeoPixelBus
Tuned esp8266
timing tuned using logic analyser
This commit is contained in:
@@ -76,28 +76,28 @@ void NeoPixelBus::Begin(void)
|
|||||||
#if defined(ESP8266)
|
#if defined(ESP8266)
|
||||||
#pragma optimize( "", off )
|
#pragma optimize( "", off )
|
||||||
|
|
||||||
void send_ws_0_800(uint8_t gpio) {
|
void 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 = 9; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, 1 << gpio);
|
i = 6; while (i--) GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, 1 << gpio);
|
||||||
}
|
}
|
||||||
|
|
||||||
void send_ws_1_800(uint8_t gpio) {
|
void send_ws_1_800(uint8_t gpio) {
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
i = 8; 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 = 5; 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 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 = 17; 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 send_ws_1_400(uint8_t gpio) {
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
i = 16; 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 = 9; 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 )
|
#pragma optimize( "", on )
|
||||||
#endif
|
#endif
|
||||||
|
@@ -39,7 +39,7 @@ License along with NeoPixel. If not, see
|
|||||||
|
|
||||||
// v1 NeoPixels aren't handled by default, include the following define before the
|
// v1 NeoPixels aren't handled by default, include the following define before the
|
||||||
// NeoPixelBus library include to support the slower bus speeds
|
// NeoPixelBus library include to support the slower bus speeds
|
||||||
// #define INCLUDE_NEO_KHZ400_SUPPORT
|
//#define INCLUDE_NEO_KHZ400_SUPPORT
|
||||||
|
|
||||||
class NeoPixelBus
|
class NeoPixelBus
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user