1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Fix X_RACERSPI target

The pin mapping for this target wasn't quite right.

o) old PWM (input) indexes 7,8 didn't really exist (removing these PWMs changed the
   numbers of PWM outputs 9-16 to 7-14)
o) PWM (output) indexes that are now PWM13,14 are shared with UART2 (PA2, PA3)
o) PWM inputs that were marked 7 and 8 were really 5 and 6 (verified with continuity
   test).  Renumbered to 5, 6.  Also, these are softserial 1 (PB0, PB1)
o) PWM inputs 5 and 6 were really MISO and MOSI of SPI1 and not wired to the inputs
   on the board.  Removed as timers. (PB4, PB5)
o) PWM inputs 3 and 4 are shared with UART3 (PB10, PB11)

The rest of the changes are:
o) remove X_RACERSPI reliance on SPRACINGF3 defined
o) fix main.c usage of softserial and X_RACERSPI
o) fix pwm_mapping to avoid collisions between UARTS and PWMs.  UARTs win.
This commit is contained in:
Mitch Miers 2016-09-23 23:09:15 -04:00
parent a21694b065
commit 7219fb1fbc
5 changed files with 51 additions and 33 deletions

View file

@ -396,7 +396,7 @@ void init(void)
}
#endif
#if defined(SPRACINGF3MINI) || defined(OMNIBUS)
#if defined(SPRACINGF3MINI) || defined(OMNIBUS) || defined(X_RACERSPI)
#if defined(SONAR) && defined(USE_SOFTSERIAL1)
if (feature(FEATURE_SONAR) && feature(FEATURE_SOFTSERIAL)) {
serialRemovePort(SERIAL_PORT_SOFTSERIAL1);