-
-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
WS2812 ARM Driver (rgblight+rgb_matrix) #6675
Conversation
…eriod and dutycycle values.
…, tickless not supported on ST frquencies lower than 10khz. The alternate for this would be to add a divisor to timer_read() to account for the increased timer resolution. (lots of impacts to userland and custom builds)
brought back matrix.c and removed dipswitch specific functionality that is now covered by the quantum 'driver'.
This reverts commit 8bb1c26. Issue actually introduced by problem with merge.
I was not aware of #4670. It would be nice to have both options available.
…On Thu, Sep 5, 2019 at 10:51 PM Drashna Jaelre ***@***.***> wrote:
While the approach may not be identical, it's very similar.
#4670 <#4670>, #6301
<#6301>, #6515
<#6515> all implement WS2812
support for ARM.
This is NOT a dig at you, this is mostly for notes and reference.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6675?email_source=notifications&email_token=AAPFL2JFC2DMJKLWL4V7MCDQIHHVRA5CNFSM4ITZHYO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6BULWI#issuecomment-528696793>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPFL2MJR5QKZSO7QDB5UPLQIHHVRANCNFSM4ITZHYOQ>
.
|
Absolutely! However, that PR is (in theory) waiting on an update to ChibiOS (the main ARM HAL that we use). |
There's quite a bit of mixing of tabs and spaces in the PR. |
True. I'll take a look at correcting those this week.
…On Sun, Sep 8, 2019, 2:17 PM Danny ***@***.***> wrote:
There's quite a bit of mixing of tabs and spaces in the PR.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6675?email_source=notifications&email_token=AAPFL2IJQMVVTZS7YUPWCZDQIVFT3A5CNFSM4ITZHYO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6FXKJA#issuecomment-529233188>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPFL2IAB4XC4N6OFDH5IP3QIVFT3ANCNFSM4ITZHYOQ>
.
On Sun, Sep 8, 2019, 2:17 PM Danny ***@***.***> wrote:
There's quite a bit of mixing of tabs and spaces in the PR.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6675?email_source=notifications&email_token=AAPFL2IJQMVVTZS7YUPWCZDQIVFT3A5CNFSM4ITZHYO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6FXKJA#issuecomment-529233188>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPFL2IAB4XC4N6OFDH5IP3QIVFT3ANCNFSM4ITZHYOQ>
.
|
I would like some input or normalizing the configuration on this pr. I'm not really a fan of WS2812 specific vars but i also do not want to make any choices in a vacuum. |
@kratsyn
This should divide by 800000. |
@kratsyn are you sure this has been tested on f103? My understanding is |
Crud. Good catch, seems I missed bringing that ifdef statement from my f1
test setup. I'm tied up with family until mid week so this likely will not
happen until then.
I'll also take a look at the period math for the f0.
…On Sun, Sep 22, 2019, 4:08 PM Joel Challis ***@***.***> wrote:
This PR has been tested against the following boards: planck rev6, preonic
rev3, proton_c, f103 bluepill, f103 blackpill, and robodyn black pill
(f303).
@kratsyn <https://github.com/kratsyn> are you sure this has been tested
on f103? My understanding is PAL_MODE_ALTERNATE() does not exist on that
platform.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6675?email_source=notifications&email_token=AAPFL2LYUI5ZX7IFBKFKWMDQK7NFDA5CNFSM4ITZHYO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7JPJRI#issuecomment-533918917>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPFL2KYFUIKBO6UD3AUKOLQK7NFDANCNFSM4ITZHYOQ>
.
|
I've not spaced on this, dealing with family drama and will resume when i have the time the spare. |
|
||
/** | ||
* @brief System tick frequency. | ||
* @details Frequency of the system timer that drives the system ticks. This | ||
* setting also defines the system tick time unit. | ||
*/ | ||
# define CH_CFG_ST_FREQUENCY 100000 | ||
# define CH_CFG_ST_FREQUENCY 1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use space instead of tab
@@ -58,7 +58,7 @@ | |||
* The value one is not valid, timeouts are rounded up to | |||
* this value. | |||
*/ | |||
# define CH_CFG_ST_TIMEDELTA 2 | |||
# define CH_CFG_ST_TIMEDELTA 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use space instead of tab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally instead this should be run through clang-format instead
#define RGB_DI_PIN A1 | ||
#ifdef RGB_DI_PIN | ||
#define RGBLED_NUM 9 | ||
#define DRIVER_LED_TOTAL RGBLED_NUM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use space instead of tab
#define RGB_DI_PIN A1 | ||
#ifdef RGB_DI_PIN | ||
#define RGBLED_NUM 9 | ||
#define DRIVER_LED_TOTAL RGBLED_NUM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use space instead of tab
@@ -206,6 +209,9 @@ int main(void) { | |||
#endif | |||
|
|||
keyboard_task(); | |||
#if defined(RGBLIGHT_ANIMATIONS) & defined(RGBLIGHT_ENABLE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#if defined(RGBLIGHT_ANIMATIONS) & defined(RGBLIGHT_ENABLE) | |
#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE) |
Thank you for your contribution! |
I know there is an existing PR for RGB support for arm however there has not been much movement in those PRs and this implementation differs enough to warrant new discussion.
Description
This implementation uses a single timer and dma channel to avoid affecting an entire gpio port and reduces the chances of impacting other feature usage. One caveat to note is that we are forced to reduce the global system clock to avoid having to introduce a divisor to timer_read(). There are no system level performance impacts for this change as it will only affect the virtual timer implementation within chibi.
This PR has been tested against the following boards: planck rev6, preonic rev3, proton_c, f103 bluepill, f103 blackpill, and robodyn black pill (f303).
Types of Changes
Issues Fixed or Closed by This PR
Checklist