summaryrefslogtreecommitdiff
path: root/drivers/avr/ws2812.c
AgeCommit message (Collapse)Author
2021-02-09ws2812: Fix number of nops for AVR at 8 MHz (#9559)Sergey Vlasov
* ws2812: Fix number of nops for AVR at 8 MHz When trying to calculate the number of nops for AVR running at 8 MHz, the value of `w3` is expected to be negative; however, because `F_CPU` is defined in tmk_core/avr.mk with the `UL` suffix, the preprocessor performs its calculations using `unsigned long`, getting a very large positive number instead of the expected negative number; this then results in generating code with a huge number of nops. Fix the broken calculations by performing a comparison before subtraction, so that the unsigned number wraparound does not occur. The keyboard which triggers the problem is `handwired/promethium`; the buggy code silently compiles, but the resulting timings would be completely wrong. * ws2812: Clean up the code after the 8 MHz fix Remove old code which was unsuccessfully trying to clamp negative w1, w2 and w3 values to 0, and set w1_nops, w2_nops and w3_nops directly.
2020-06-20Fix incorrect delay when setting WS2812 (and similar) leds (#9302)Joshua Diamond
* Fix incorrect delay when setting WS2812 (and similar) leds * Add documentation for WS2812_DELAY_MICROSECONDS * Remove improper cast to uint8_t Co-authored-by: Sergey Vlasov <sigprof@gmail.com> * Remove unneeded cast to uint8_t and correct math Co-authored-by: Sergey Vlasov <sigprof@gmail.com> * microseconds -> µs Co-authored-by: Ryan <fauxpark@gmail.com> * Make documentation better match the spec sheet. Co-authored-by: Ryan <fauxpark@gmail.com> * Rename macro to match spec sheet * Further correction to the delay maths for the SPI case. Co-authored-by: Joel Challis <git@zvecr.com> * Move ws2812_common.h to the drivers directory * Revert "Further correction to the delay maths for the SPI case." This reverts commit e61b56a2cfc7dfec9992a7a3af92afa50e5b8ec0. * Remove ws2812_setleds_pin(); consolidate ws2812.h Co-authored-by: Sergey Vlasov <sigprof@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Joel Challis <git@zvecr.com>
2020-04-02Fix AVR ws2812 when ADDRESS_BASE is non zero (#8646)Joel Challis
* Fix AVR ws2812 when ADDRESS_BASE is non zero * fix port * remove unused function defs
2019-11-14Move Ergodox EZ RGB Light code to custom driver (#7309)Drashna Jaelre
* Move Ergodox EZ RGB code to custom driver Also implements full addressing of Ergodox EZ's LED Strip, as written by seebs Co-authored-by: Seebs <seebs@seebs.net> * Make Clipping range accessible for custom drivers * Remove RGBW_BB_TWI from driver and docs * Revert changes to clipping range support * Use just rgblight_set instead of full custom driver * Convert to i2c_master commands * Rename rgblight driver and clean up includes
2019-11-09Unify RGB and RGBW commands (#7297)Drashna Jaelre
* Fix unicode in comments Co-Authored-By: fauxpark <fauxpark@gmail.com> * Remove separate RGBW implementation for a unified function * Set White to 0 in RGBW LEDs This is just to get this working, later, proper brightness can be handled elsewhere. * Use us instead of nanoseconds(?) since it renders correctly on web * Remove RGBW function from arm/ws2812.h * Remove RGBW function from arm/ws2812.c * Formatting changes * Add doc info
2019-10-29Reduce duplication for ARM/AVR ws2812 RGB Matrix driver (#7180)Joel Challis
* Reduce duplication for ARM/AVR ws2812 rgb_matrix driver * Reduce duplication for ARM/AVR ws2812 rgb_matrix driver - Fix setled_all use of r,g,b
2019-08-30clang-format changesskullY
2019-05-01Fixing incorrect usage of RGBLED_NUM in ws2812 driver when used with RGB ↵XScorpion2
Matrix (#5744)
2019-04-14Features/ws2812 matrix driver (#5418)XScorpion2
* WS2812 driver implementation for RGB Matrix * Added driver configuration docs
2019-01-28Practice60 RGB and PWM Backlight (#4929)Andrew Kannan
* Update Practice60 to enable RGB via SPI DMA and use PWM backlight breathing * Correct stm32f103c8t6 flash size in eeprom definition * Remove unused files and improve ifdef checks * Update quantum/rgblight.c Co-Authored-By: awkannan <andrew.kannan@klaviyo.com> * Update quantum/rgblight.c Co-Authored-By: awkannan <andrew.kannan@klaviyo.com> * EEPROM implementation fix and updated p60 code * Update define * Remove dead code * Update keymap to remove test key * Update keymap again
2017-07-10Start mvoing hardware drivers to /drivers/ (#1433)Jack Humbert
* start driver isolation * update nyquist and orthodox boards * update atreus62 * move drivers to avr * update avr conditional