Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
b6d01c36
Commit
b6d01c36
authored
6 years ago
by
David Sidrane
Committed by
Lorenz Meier
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
px4fmu-v5:Support RX TX swap
parent
8076b103
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/drivers/boards/px4fmu-v5/board_config.h
+4
-1
4 additions, 1 deletion
src/drivers/boards/px4fmu-v5/board_config.h
src/drivers/boards/px4fmu-v5/init.c
+7
-0
7 additions, 0 deletions
src/drivers/boards/px4fmu-v5/init.c
with
11 additions
and
1 deletion
src/drivers/boards/px4fmu-v5/board_config.h
+
4
−
1
View file @
b6d01c36
...
...
@@ -521,7 +521,10 @@
#define RC_UXART_BASE STM32_USART6_BASE
#define RC_SERIAL_PORT "/dev/ttyS4"
#define RC_SERIAL_PORT_IS_FULL_DUPLEX false
#define BOARD_HAS_SINGLE_WIRE 1
/* HW is capable of Single Wire */
#define BOARD_HAS_SINGLE_WIRE_ON_TX 1
/* HW default is wired as Single Wire On TX pin */
#define BOARD_HAS_RX_TX_SWAP 1
/* HW Can swap TX and RX */
#define RC_SERIAL_PORT_IS_SWAPED 0
/* Board wired with RC's TX is on cpu RX */
#define GPS_DEFAULT_UART_PORT "/dev/ttyS0"
/* UART1 on FMUv5 */
...
...
This diff is collapsed.
Click to expand it.
src/drivers/boards/px4fmu-v5/init.c
+
7
−
0
View file @
b6d01c36
...
...
@@ -130,7 +130,14 @@ __EXPORT void board_rc_input(bool invert_on, uint32_t uxart_base)
putreg32
(
regval
,
STM32_USART_CR1_OFFSET
+
uxart_base
);
if
(
invert_on
)
{
#if defined(BOARD_HAS_RX_TX_SWAP) && RC_SERIAL_PORT_IS_SWAPED == 1
/* This is only tuned on */
cr2
|=
(
USART_CR2_RXINV
|
USART_CR2_TXINV
|
USART_CR2_SWAP
);
#else
cr2
|=
(
USART_CR2_RXINV
|
USART_CR2_TXINV
);
#endif
}
else
{
cr2
&=
~
(
USART_CR2_RXINV
|
USART_CR2_TXINV
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment