-
Notifications
You must be signed in to change notification settings - Fork 936
Issue #370 fix #418
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
base: develop
Are you sure you want to change the base?
Issue #370 fix #418
Changes from 5 commits
de4ef55
0fbb30e
e6daba9
ddb810e
8e17b7b
5a72b25
2f08893
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
// but we are using a threshold of 8 here (consume 1 byte from each FIFO entry | ||
// and discard the remainder) to make things easier for software on the other side | ||
|
||
static inline void st7789_lcd_program_init(PIO pio, uint sm, uint offset, uint data_pin, uint clk_pin, float clk_div) { | ||
static inline void st7789_lcd_program_init(PIO pio, uint sm, uint offset, bool cpol, uint data_pin, uint clk_pin, float clk_div) { | ||
pio_gpio_init(pio, data_pin); | ||
pio_gpio_init(pio, clk_pin); | ||
pio_sm_set_consecutive_pindirs(pio, sm, data_pin, 1, true); | ||
|
@@ -33,6 +33,11 @@ static inline void st7789_lcd_program_init(PIO pio, uint sm, uint offset, uint d | |
sm_config_set_fifo_join(&c, PIO_FIFO_JOIN_TX); | ||
sm_config_set_clkdiv(&c, clk_div); | ||
sm_config_set_out_shift(&c, false, true, 8); | ||
|
||
// The pin muxes can be configured to invert the output (among other things | ||
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. It appears to me that the closing paren must've been omitted: -// The pin muxes can be configured to invert the output (among other things
+// The pin muxes can be configured to invert the output (among other things), 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. This was changed. 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. Thanks for your help! I have no merging powers vested in me :) From my experience, the repo maintainers approved and merged after quite some time, before releasing the new SDK version. |
||
// and this is a cheesy way to allow changing polarity | ||
gpio_set_outover(clk_pin, cpol ? GPIO_OVERRIDE_INVERT : GPIO_OVERRIDE_NORMAL); | ||
|
||
pio_sm_init(pio, sm, offset, &c); | ||
pio_sm_set_enabled(pio, sm, true); | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.