Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
B
bldc_uart_comm_stm32f4_discovery
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
João Lino
bldc_uart_comm_stm32f4_discovery
Commits
70b082c8
Commit
70b082c8
authored
Oct 09, 2015
by
Benjamin Vedder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made the code build with the C89 standard and changed to tickless kernel mode
parent
25f80168
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
5 deletions
+7
-5
Makefile
Makefile
+1
-1
bldc_interface.c
bldc_interface.c
+2
-1
chconf.h
chconf.h
+2
-2
packet.c
packet.c
+2
-1
No files found.
Makefile
View file @
70b082c8
...
...
@@ -5,7 +5,7 @@
# Compiler options here.
ifeq
($(USE_OPT),)
USE_OPT
=
-O2
-ggdb
-fomit-frame-pointer
-falign-functions
=
16
-std
=
gnu99
USE_OPT
=
-O2
-ggdb
-fomit-frame-pointer
-falign-functions
=
16
endif
# C specific options here (added to USE_OPT).
...
...
bldc_interface.c
View file @
70b082c8
...
...
@@ -109,6 +109,7 @@ void bldc_interface_process_packet(unsigned char *data, unsigned int len) {
}
int32_t
ind
=
0
;
int
i
=
0
;
unsigned
char
id
=
data
[
0
];
data
++
;
len
--
;
...
...
@@ -304,7 +305,7 @@ void bldc_interface_process_packet(unsigned char *data, unsigned int len) {
ind
=
0
;
detect_cycle_int_limit
=
buffer_get_float32
(
data
,
1000
.
0
,
&
ind
);
detect_coupling_k
=
buffer_get_float32
(
data
,
1000
.
0
,
&
ind
);
for
(
i
nt
i
=
0
;
i
<
8
;
i
++
)
{
for
(
i
=
0
;
i
<
8
;
i
++
)
{
detect_hall_table
[
i
]
=
(
const
signed
char
)(
data
[
ind
++
]);
}
detect_hall_res
=
(
const
signed
char
)(
data
[
ind
++
]);
...
...
chconf.h
View file @
70b082c8
...
...
@@ -59,7 +59,7 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
#define CH_CFG_ST_TIMEDELTA
0
#define CH_CFG_ST_TIMEDELTA
2
/** @} */
...
...
@@ -82,7 +82,7 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
#define CH_CFG_TIME_QUANTUM
4
#define CH_CFG_TIME_QUANTUM
0
/**
* @brief Managed RAM size.
...
...
packet.c
View file @
70b082c8
...
...
@@ -80,7 +80,8 @@ void packet_send_packet(unsigned char *data, unsigned int len, int handler_num)
* Call this function every millisecond.
*/
void
packet_timerfunc
(
void
)
{
for
(
int
i
=
0
;
i
<
PACKET_HANDLERS
;
i
++
)
{
int
i
=
0
;
for
(
i
=
0
;
i
<
PACKET_HANDLERS
;
i
++
)
{
if
(
handler_states
[
i
].
rx_timeout
)
{
handler_states
[
i
].
rx_timeout
--
;
}
else
{
...
...
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