diff options
author | Aldehir Rojas <hello@aldehir.com> | 2020-12-29 18:28:49 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-30 00:28:49 +0000 |
commit | 4f2f21dc05c70451593ba83ed7a0956c771850c2 (patch) | |
tree | 266942c390a6b8d78d6f7c2994039a5f8b2eba98 /drivers/avr/apa102.h | |
parent | 7dd99f2b22a34143c0443154d9cd97540443b096 (diff) |
Rewrite APA102 support (#10894)
* Rewrite APA102 support
The APA102 source was broken by commit 16a15c1cfcbfd0feb2c2cf1383676747e2f97d73 as it did not include the
quantum header. This commit addresses that, as well as other issues with
transferring bytes over the SPI interface, i.e. it was not setting the
clock pin back to low after sending a bit.
The deviation when sending the end frame is kept, but updated to the
latest from the referenced project.
Finally, these changes expose the global LED brightness parameter
of the APA102. Brightness values are configurable through
`APA102_DEFAULT_BRIGHTNESS` and `APA102_MAX_BRIGHTNESS`.
* Fix typo in led brightness extern
* Move driver out of AVR directory and add delay for ARM
* Experimental APA102 support on AVR and ARM
Co-authored-by: Alde Rojas <hello@alde.io>
* Refactor apa102_send_byte() calls to a loop
* Implement io_wait function for ARM
* Move APA102 drivers to own directory, fix copyright notice
* Add APA102 keymap to handwired/onekey
* Simplify RGBLIGHT_ENABLE/DRIVER option handling
Co-authored-by: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com>
Diffstat (limited to 'drivers/avr/apa102.h')
-rw-r--r-- | drivers/avr/apa102.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/drivers/avr/apa102.h b/drivers/avr/apa102.h deleted file mode 100644 index d4c1e18ee1..0000000000 --- a/drivers/avr/apa102.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * light weight WS2812 lib include - * - * Version 2.3 - Nev 29th 2015 - * Author: Tim (cpldcpu@gmail.com) - * - * Please do not change this file! All configuration is handled in "ws2812_config.h" - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#include <avr/io.h> -#include <avr/interrupt.h> - -#include "color.h" - -/* User Interface - * - * Input: - * ledarray: An array of GRB data describing the LED colors - * number_of_leds: The number of LEDs to write - * pinmask (optional): Bitmask describing the output bin. e.g. _BV(PB0) - * - * The functions will perform the following actions: - * - Set the data-out pin as output - * - Send out the LED data - * - Wait 50�s to reset the LEDs - */ - -void apa102_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); -void apa102_setleds_pin(LED_TYPE *ledarray, uint16_t number_of_leds, uint8_t pinmask); -void apa102_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds); |