-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Change div_int_frac methods to be suffixed by the number of bits of fraction e.g. div_int_frac8 #1926
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
Merged
Merged
Change div_int_frac methods to be suffixed by the number of bits of fraction e.g. div_int_frac8 #1926
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d9c6151
Change div_int_frac methods to be suffixed by the number of bits of f…
kilograham 765aeb8
catch some more uses of int_frac, add some assertions to catch possib…
kilograham f2e738f
use consistent with sdk naming skeep for new cyw43_driver method... f…
kilograham 4d4964e
add missing backwards compatibility; minor var rename
kilograham e5f3ea6
standardize for the new int_frac<n> methods that the integer part is …
kilograham b3552b8
extra extra... assertion catches bug
kilograham 5dd0e1b
typo
kilograham 128396a
some review fixes
kilograham 063c7c8
more doc fixes
kilograham 7f77b13
more doc fixes
kilograham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,7 +48,7 @@ void cyw43_driver_deinit(struct async_context *context); | |
| #define CYW43_PIO_CLOCK_DIV_DYNAMIC 0 | ||
| #endif | ||
|
|
||
| // PICO_CONFIG: CYW43_PIO_CLOCK_DIV_INT, Integer part of the clock divider for communication with the wireless chip, type=bool, default=2, group=pico_cyw43_driver | ||
| // PICO_CONFIG: CYW43_PIO_CLOCK_DIV_INT, Integer part of the clock divider for communication with the wireless chip, type=int, default=2, group=pico_cyw43_driver | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LOL, how on earth did I miss this?? 🤣 |
||
| #ifndef CYW43_PIO_CLOCK_DIV_INT | ||
| // backwards compatibility using old define | ||
| #ifdef CYW43_PIO_CLOCK_DIV | ||
|
|
@@ -58,9 +58,13 @@ void cyw43_driver_deinit(struct async_context *context); | |
| #endif | ||
| #endif | ||
|
|
||
| // PICO_CONFIG: CYW43_PIO_CLOCK_DIV_FRAC, Fractional part of the clock divider for communication with the wireless chip, type=bool, default=0, group=pico_cyw43_driver | ||
| #ifndef CYW43_PIO_CLOCK_DIV_FRAC | ||
| #define CYW43_PIO_CLOCK_DIV_FRAC 0 | ||
| // PICO_CONFIG: CYW43_PIO_CLOCK_DIV_FRAC8, Fractional part of the clock divider for communication with the wireless chip 0-255, type=int, min=0, max=255, default=0, group=pico_cyw43_driver | ||
| #ifndef CYW43_PIO_CLOCK_DIV_FRAC8 | ||
| #ifdef CYW43_PIO_CLOCK_DIV_FRAC | ||
kilograham marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #define CYW43_PIO_CLOCK_DIV_FRAC8 CYW43_PIO_CLOCK_DIV_FRAC | ||
| #else | ||
| #define CYW43_PIO_CLOCK_DIV_FRAC8 0 | ||
| #endif | ||
| #endif | ||
|
|
||
| #if CYW43_PIO_CLOCK_DIV_DYNAMIC | ||
|
|
@@ -72,9 +76,14 @@ void cyw43_driver_deinit(struct async_context *context); | |
| * This function is only available if \ref CYW43_PIO_CLOCK_DIV_DYNAMIC is true | ||
| * | ||
| * \param clock_div_int Integer part of the divisor | ||
| * \param clock_div_frac Fractional part in 1/256ths | ||
| * \param clock_div_frac8 Fractional part in 1/256ths | ||
| */ | ||
| void cyw43_set_pio_clock_divisor(uint16_t clock_div_int, uint8_t clock_div_frac); | ||
| void cyw43_set_pio_clkdiv_int_frac8(uint32_t clock_div_int, uint8_t clock_div_frac8); | ||
|
|
||
| // backwards compatibility | ||
| static inline void cyw43_set_pio_clock_divisor(uint16_t clock_div_int, uint8_t clock_div_frac8) { | ||
| return cyw43_set_pio_clkdiv_int_frac8(clock_div_int, clock_div_frac8); | ||
| } | ||
| #endif | ||
|
|
||
| #if CYW43_PIN_WL_DYNAMIC | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.