Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
c01e9558
Commit
c01e9558
authored
11 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
STM32: Single wire UART support from Thomas Grubler
parent
70792243
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+2
-0
2 additions, 0 deletions
ChangeLog
arch/arm/src/stm32/stm32_serial.c
+13
-0
13 additions, 0 deletions
arch/arm/src/stm32/stm32_serial.c
with
15 additions
and
0 deletions
ChangeLog
+
2
−
0
View file @
c01e9558
...
...
@@ -6356,4 +6356,6 @@
tools (2013-21-31).
* configs/z16f2800100zcog/nsh: Add a Z16F NSH configuration. Does not
yet work (2014-1-1).
* arch/arm/src/stm32/stm32_serial.c: Single-wire UART support from
Thomas Grubler (2014-1-2).
This diff is collapsed.
Click to expand it.
arch/arm/src/stm32/stm32_serial.c
+
13
−
0
View file @
c01e9558
...
...
@@ -1744,6 +1744,18 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
uint32_t
cr
=
up_serialin
(
priv
,
STM32_USART_CR3_OFFSET
);
#if defined(CONFIG_STM32_STM32F10XX)
if
(
arg
==
SER_SINGLEWIRE_ENABLED
)
{
stm32_configgpio
((
priv
->
tx_gpio
&
~
(
GPIO_CNF_MASK
))
|
GPIO_CNF_AFOD
);
cr
|=
USART_CR3_HDSEL
;
}
else
{
stm32_configgpio
((
priv
->
tx_gpio
&
~
(
GPIO_CNF_MASK
))
|
GPIO_CNF_AFPP
);
cr
&=
~
USART_CR3_HDSEL
;
}
#else
if
(
arg
==
SER_SINGLEWIRE_ENABLED
)
{
stm32_configgpio
(
priv
->
tx_gpio
|
GPIO_OPENDRAIN
);
...
...
@@ -1754,6 +1766,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
stm32_configgpio
(
priv
->
tx_gpio
|
GPIO_PUSHPULL
);
cr
&=
~
USART_CR3_HDSEL
;
}
#endif
up_serialout
(
priv
,
STM32_USART_CR3_OFFSET
,
cr
);
}
...
...
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