Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM backlight - timer implementation #8291

Merged
merged 3 commits into from
Aug 15, 2020

Conversation

zvecr
Copy link
Member

@zvecr zvecr commented Mar 2, 2020

Description

Now that ChibiOS has been updated, we can use GPT timers to emulate Using hardware timer 1 with software PWM without using the TIM1-4 PWM timers. Binding backlight to an out the way timer avoids conflicts with other features such as PWM ws2812 and allows for a more performant default behaviour for CTPC.

Next phase could be to migrate BACKLIGHT_PWM_TIMER from the avr backlight code.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@zvecr zvecr force-pushed the feature/backlight_gpt branch 3 times, most recently from c0036e6 to 302894a Compare March 6, 2020 21:43
@drashna drashna requested a review from a team March 7, 2020 00:09
@zvecr zvecr force-pushed the feature/backlight_gpt branch from e3a9aff to 92c90cd Compare March 7, 2020 12:18
@drashna drashna requested a review from a team March 10, 2020 08:58
@drashna drashna requested a review from a team March 10, 2020 08:58
@zvecr zvecr marked this pull request as ready for review March 12, 2020 20:56
@zvecr zvecr changed the title [WIP] ARM backlight - timer implementation ARM backlight - timer implementation Mar 12, 2020
@zvecr zvecr force-pushed the feature/backlight_gpt branch from 92c90cd to b3f74bf Compare March 22, 2020 00:09
Copy link
Member

@tzarc tzarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine once I include the extra header.

make handwired/onekey/proton_c:backlight BACKLIGHT_ENABLE=yes BACKLIGHT_DRIVER=timer

quantum/backlight/backlight_timer.c Outdated Show resolved Hide resolved
quantum/backlight/backlight_timer.c Show resolved Hide resolved
@stale
Copy link

stale bot commented May 30, 2020

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

@tzarc tzarc self-requested a review May 30, 2020 03:12
@tzarc tzarc requested a review from a team May 30, 2020 03:12
@drashna drashna requested a review from a team June 3, 2020 05:00
@tzarc tzarc changed the base branch from master to develop July 25, 2020 23:02
@tzarc
Copy link
Member

tzarc commented Jul 25, 2020

Retargeted to develop -- conflicting file now lives at platforms/chibios/GENERIC_STM32_F303XC/configs/mcuconf.h.

@zvecr zvecr force-pushed the feature/backlight_gpt branch from 5745bfc to 3cd3793 Compare August 14, 2020 20:05
@zvecr zvecr force-pushed the feature/backlight_gpt branch from 3cd3793 to 452d391 Compare August 14, 2020 20:07
Copy link
Member

@noroadsleft noroadsleft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__attribute__ ((weak)) ✔️

quantum/backlight/backlight_timer.c Outdated Show resolved Hide resolved
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
@noroadsleft noroadsleft merged commit 489dcfa into qmk:develop Aug 15, 2020
@noroadsleft
Copy link
Member

Thanks!

noroadsleft pushed a commit that referenced this pull request Aug 27, 2020
* Add GPT timer based backlight driver

* Update to tim15 to avoid conflict with audio

* Update quantum/backlight/backlight_timer.c
noroadsleft pushed a commit that referenced this pull request Aug 29, 2020
* Add GPT timer based backlight driver

* Update to tim15 to avoid conflict with audio

* Update quantum/backlight/backlight_timer.c
nicocesar pushed a commit to nicocesar/qmk_firmware that referenced this pull request Sep 6, 2020
* Add GPT timer based backlight driver

* Update to tim15 to avoid conflict with audio

* Update quantum/backlight/backlight_timer.c
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Sep 30, 2020
* Add GPT timer based backlight driver

* Update to tim15 to avoid conflict with audio

* Update quantum/backlight/backlight_timer.c
kjganz pushed a commit to kjganz/qmk_firmware that referenced this pull request Oct 28, 2020
* Add GPT timer based backlight driver

* Update to tim15 to avoid conflict with audio

* Update quantum/backlight/backlight_timer.c
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
* Add GPT timer based backlight driver

* Update to tim15 to avoid conflict with audio

* Update quantum/backlight/backlight_timer.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants