Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lwc
/
compare
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cbeeca91
authored
Jul 22, 2019
by
Sebastian Renner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
F7 GPIO guard
parent
04c5f18d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
templates/f7/Src/main.c
+11
-0
templates/f7/middleware.py
+1
-0
No files found.
templates/f7/Src/main.c
View file @
cbeeca91
...
...
@@ -371,6 +371,17 @@ static void MX_GPIO_Init(void)
LL_GPIO_ResetOutputPin
(
LD2_GPIO_Port
,
LD2_Pin
);
/**/
LL_GPIO_SetOutputPin
(
GPIOD
,
LL_GPIO_PIN_7
);
/**/
GPIO_InitStruct
.
Pin
=
LL_GPIO_PIN_7
;
GPIO_InitStruct
.
Mode
=
LL_GPIO_MODE_OUTPUT
;
GPIO_InitStruct
.
Speed
=
LL_GPIO_SPEED_FREQ_VERY_HIGH
;
GPIO_InitStruct
.
OutputType
=
LL_GPIO_OUTPUT_PUSHPULL
;
GPIO_InitStruct
.
Pull
=
LL_GPIO_PULL_NO
;
LL_GPIO_Init
(
GPIOD
,
&
GPIO_InitStruct
);
/**/
GPIO_InitStruct
.
Pin
=
LL_GPIO_PIN_0
;
GPIO_InitStruct
.
Mode
=
LL_GPIO_MODE_OUTPUT
;
GPIO_InitStruct
.
Speed
=
LL_GPIO_SPEED_FREQ_LOW
;
...
...
templates/f7/middleware.py
View file @
cbeeca91
...
...
@@ -54,6 +54,7 @@ def submit(channel, action, data):
else
:
h
=
struct
.
pack
(
"<BI"
,
ord
(
action
),
len
(
data
))
write
(
channel
,
h
)
time
.
sleep
(
0.1
)
write
(
channel
,
data
)
def
main
(
argv
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment