summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2021-05-09Merge remote-tracking branch 'origin/master' into developQMK Bot
2021-05-08haptic: correct size of reserved field in the haptic structure. This saves 1 ↵Purdea Andrei
byte of wasted SRAM. (#12483) Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-05-08Added OLED fade out support (#12086)Barabas
2021-04-25Update ADC driver for STM32F1xx, STM32F3xx, STM32F4xx (#12403)Sergey Vlasov
* Fix default ADC_RESOLUTION for ADCv3 (and ADCv4) Recent ChibiOS update removed ADC_CFGR1_RES_10BIT from the ADCv3 headers (that macro should not have been there, because ADCv3 has CFGR instead of CFGR1). Fix the default value for ADC_RESOLUTION to use ADC_CFGR_RES_10BITS if it is defined (that name is used for ADCv3 and ADCv4). * Update ADC docs to match the actually used resolution ADC driver for ChibiOS actually uses the 10-bit resolution by default (probably to match AVR); fix the documentation accordingly. Also add both ADC_CFGR_RES_10BITS and ADC_CFGR1_RES_10BIT constants (these names differ according to the ADC implementation in the particular MCU). * Fix pinToMux() for B12 and B13 on STM32F3xx Testing on STM32F303CCT6 revealed that the ADC mux values for B12 and B13 pins were wrong. * Add support for all possible analog pins on STM32F1xx Added ADC mux values for pins A0...A7, B0, B1, C0...C5 on STM32F1xx (they are the same at least for STM32F103x8 and larger F103 devices, and also F102, F105, F107 families). Actually tested on STM32F103C8T6 (therefore pins C0...C5 were not tested). Pins F6...F10, which are present on STM32F103x[C-G] in 144-pin packages, cannot be supported at the moment, because those pins are connected only to ADC3, but the ChibiOS ADC driver for STM32F1xx supports only ADC1. * Add support for all possible analog pins on STM32F4xx Added ADC mux values for pins A0...A7, B0, B1, C0...C5 and optionally F3...F10 (if STM32_ADC_USE_ADC3 is enabled). These mux values are apparently the same for all F4xx devices, except some smaller devices may not have ADC3. Actually tested on STM32F401CCU6, STM32F401CEU6, STM32F411CEU6 (using various WeAct “Blackpill” boards); only pins A0...A7, B0, B1 were tested. Pins F3...F10 are inside `#if STM32_ADC_USE_ADC3` because some devices which don't have ADC3 also don't have the GPIOF port, therefore the code which refers to Fx pins does not compile. * Fix STM32F3xx ADC mux table in documentation The ADC driver documentation had some errors in the mux table for STM32F3xx. Fix this table to match the datasheet and the actual code (mux settings for B12 and B13 were also tested on a real STM32F303CCT6 chip). * Add STM32F1xx ADC pins to the documentation * Add STM32F4xx ADC pins to the documentation
2021-04-19Merge remote-tracking branch 'origin/master' into developQMK Bot
2021-04-19Fixup Satisfaction75 bootprocess. (#12621)Nick Brassel
- Use normal ChibiOS I2C driver. - Move drawing code to housekeeping -- previously it was during matrix scan, which gets executed during bootmagic checks. However, bootmagic is invoked before QWIIC subsystem is enabled, which means I2C isn't configured yet. All I2C calls to the OLED fail with timeouts while bootmagic is being checked. Housekeeping ensures this is executed once the system has initialised and settled. - QWIIC OLED driver: properly clear out OLED buffer when clearing screen.
2021-03-25Format code according to conventions (#12381)github-actions[bot]
Co-authored-by: QMK Bot <hello@qmk.fm>
2021-03-25Fix connection issue in split keyboards when slave and OLED display are ↵Oleg Senchenko
connected via I2C, fix #9335 (#11487) * In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix #9335 * Revert "In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix #9335" This reverts commit 3ee639e1f35fb0fe257fc3ba1095124e039af7d7. * In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix #9335 * Update drivers/oled/oled_driver.c Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: osenchenko <osechenko@chiefmate.io> Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-03-19Format code according to conventions (#12292)github-actions[bot]
Co-authored-by: QMK Bot <hello@qmk.fm>
2021-03-19ARM WS2812 SPI config (baudrate and circular buffer) (#12216)Xelus22
* initial commit * include circular buffer command * add endif * circular buffer mode * remove untrue comment * revamp and add documentation * do not allow WS2812_SPI_SYNC & CIRCULAR_BUFFER
2021-03-05Set default OLED Update Interval for Split Keyboards (#12107)Drashna Jaelre
Because the matrix scanning is slower for splits, in general, the frequent updating of the OLEDs can slow down the matrix scanning. To help prevent that, set the update interval for the OLEDs to not update as frequently.
2021-03-02Add support for complementary outputs to the WS2812 PWM driver (#11988)Sergey Vlasov
2021-02-14Merge branch 'master' into developJoshua Diamond
2021-02-15LED Matrix: rename `LED_DRIVER_LED_COUNT` to `DRIVER_LED_TOTAL` (#11858)Ryan
2021-02-15Format code according to conventions (#11907)github-actions[bot]
Co-authored-by: QMK Bot <hello@qmk.fm>
2021-02-15Add support for analog USBPD on STM32G4xx. (#11824)Nick Brassel
* Add support for analog USBPD on STM32G4xx. * Split up to a list of driver types, allow for custom.
2021-02-15Format code according to conventions (#11905)github-actions[bot]
Co-authored-by: QMK Bot <hello@qmk.fm>
2021-02-08Merge remote-tracking branch 'origin/master' into developQMK Bot
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.
2021-01-30Include stdbool.h in uart.h (#11728)Drashna Jaelre
2021-01-29Adds AT90USB162 support (#11570)Dasky
* at90usb162 support * fix missing bracket * Apply suggestions from code review Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
2021-01-27UART driver refactor (#11637)Ryan
2021-01-15Merge remote-tracking branch 'origin/master' into developQMK Bot
2021-01-16Add BGR byte order for WS2812 drivers (#11562)kb-elmo
* add byte order bgr for ws2812 * update docs for driver change * Update ws2812_driver.md * Update docs/ws2812_driver.md Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
2021-01-04Split up QWIIC_ENABLE to use QWIIC_DRIVERS as well, with yes/no for enable ↵Nick Brassel
flag. (#11426)
2021-01-03Merge remote-tracking branch 'upstream/master' into developNick Brassel
2021-01-03Align ChibiOS spi_master behaviour with AVR (#11404)Ryan
* Align ChibiOS spi_master behaviour with AVR * Rollback `spi_transmit()` and `spi_receive()` to preserve DMA
2020-12-30Rewrite APA102 support (#10894)Aldehir Rojas
* 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>
2020-12-27Merge remote-tracking branch 'origin/master' into developQMK Bot
2020-12-28Ensure single newline at EOF for core files (#11310)Ryan
2020-12-26Merge remote-tracking branch 'origin/master' into developQMK Bot
2020-12-26Change include guards in tmk_core/ and drivers/ to pragma once (#11240)Ryan
2020-12-18Merge remote-tracking branch 'origin/master' into developQMK Bot
2020-12-18Various compilation fixes for avr-gcc 10 (#9269)Joel Challis
2020-12-18Merge remote-tracking branch 'upstream/master' into developfauxpark
2020-12-17Run cformat and dos2unix manually (#11235)Ryan
2020-12-16Merge remote-tracking branch 'origin/master' into developQMK Bot
2020-12-16Normalise include statements in keyboard code (#11185)Ryan
2020-12-13Merge remote-tracking branch 'origin/master' into developQMK Bot
2020-12-14Add i2c 24LC64 eeprom (#11200)Xelus22
* add 24LC64 eeprom * docs update * Update docs/eeprom_driver.md Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Joel Challis <git@zvecr.com>
2020-12-11Merge remote-tracking branch 'origin/master' into developQMK Bot
2020-12-11Normalise include statements in core code (#11153)Ryan
* Normalise include statements in core code * Missed one
2020-12-06Merge remote-tracking branch 'origin/master' into developQMK Bot
2020-12-06Update is31fl3731-simple (#7610)Xelus22
* update simple * Update is31fl3731-simple.c
2020-12-06Merge remote-tracking branch 'origin/master' into developQMK Bot
2020-12-06add definition WS2812_BYTE_ORDER to fix RGB LED issues (#10184)Josh Hinnebusch
* add define for WS2812B-2020 to fix RGB issues * update driver doc * add WS2812_BYTE_ORDER definition to correct RGB byte issues * add definition variable thing * update per PR request * update per PR reqs * update per PR request * inital changes * move defines to color.h and add rgbw incase * Update docs/ws2812_driver.md Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: hineybush <hineybushkeyboards@gmail.com> Co-authored-by: Xelus22 <preyas22@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
2020-12-06Merge remote-tracking branch 'origin/master' into developQMK Bot
2020-12-06Added OLED Initialized checks (#11129)XScorpion2
2020-12-06Merge remote-tracking branch 'origin/master' into developQMK Bot
2020-12-06Fix error handling in SPI master. (#11122)Dimitris Papavasiliou
Co-authored-by: Dimitris Papavasiliou <dpapavas@gmail.com>