Tuned esp8266

timing tuned using logic analyser
This commit is contained in:
Makuna
2015-04-30 15:25:53 -07:00
parent 236d9f7849
commit 3853080e4e
2 changed files with 9 additions and 9 deletions

View File

@@ -76,28 +76,28 @@ void NeoPixelBus::Begin(void)
#if defined(ESP8266)
#pragma optimize( "", off )
void send_ws_0_800(uint8_t gpio) {
void send_ws_0_800(uint8_t gpio) {
uint8_t i;
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;
i = 8; 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 = 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);
}
void send_ws_0_400(uint8_t gpio) {
uint8_t i;
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) {
uint8_t i;
i = 16; 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 = 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);
}
#pragma optimize( "", on )
#endif

View File

@@ -39,7 +39,7 @@ License along with NeoPixel. If not, see
// v1 NeoPixels aren't handled by default, include the following define before the
// NeoPixelBus library include to support the slower bus speeds
// #define INCLUDE_NEO_KHZ400_SUPPORT
//#define INCLUDE_NEO_KHZ400_SUPPORT
class NeoPixelBus
{