Skip to content

Commit

Permalink
Update some changes for AT32F415 (#24766)
Browse files Browse the repository at this point in the history
* Fixed SPI can't compiled issue

* Added solenoid support and use 256KB ldscript for Onekey board
  • Loading branch information
HorrorTroll authored Jan 3, 2025
1 parent 9a0f4e5 commit cc3823f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions keyboards/handwired/onekey/at_start_f415/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@

#define BACKLIGHT_PWM_DRIVER PWMD5
#define BACKLIGHT_PWM_CHANNEL 1

#define SOLENOID_PIN B12
#define SOLENOID_PINS { B12, B13, B14, B15 }
#define SOLENOID_PINS_ACTIVE_STATE { high, high, low }
1 change: 1 addition & 0 deletions keyboards/handwired/onekey/at_start_f415/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MCU_LDSCRIPT = AT32F415xC
4 changes: 2 additions & 2 deletions platforms/chibios/drivers/spi_master.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ bool spi_start_extended(spi_start_config_t *start_config) {
#elif defined(AT32F415)
spiConfig.ctrl1 = 0;

if (lsbFirst) {
if (start_config->lsb_first) {
spiConfig.ctrl1 |= SPI_CTRL1_LTF;
}

switch (mode) {
switch (start_config->mode) {
case 0:
break;
case 1:
Expand Down

0 comments on commit cc3823f

Please sign in to comment.