Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
5bae4f84
Commit
5bae4f84
authored
11 years ago
by
Oleg Hahm
Browse files
Options
Downloads
Patches
Plain Diff
added one-time-initialization guard to transceiver
parent
79ff4f1c
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
core/include/flags.h
+4
-4
4 additions, 4 deletions
core/include/flags.h
sys/transceiver/transceiver.c
+6
-1
6 additions, 1 deletion
sys/transceiver/transceiver.c
with
10 additions
and
5 deletions
core/include/flags.h
+
4
−
4
View file @
5bae4f84
...
@@ -16,10 +16,10 @@
...
@@ -16,10 +16,10 @@
#ifndef _FLAGS_H
#ifndef _FLAGS_H
#define _FLAGS_H
#define _FLAGS_H
#define CREATE_SLEEPING
1
#define CREATE_SLEEPING
(1)
#define AUTO_FREE
2
#define AUTO_FREE
(2)
#define CREATE_WOUT_YIELD
4
#define CREATE_WOUT_YIELD
(4)
#define CREATE_STACKTEST
8
#define CREATE_STACKTEST
(8)
/**
/**
* @}
* @}
...
...
This diff is collapsed.
Click to expand it.
sys/transceiver/transceiver.c
+
6
−
1
View file @
5bae4f84
...
@@ -62,7 +62,7 @@ msg_t msg_buffer[TRANSCEIVER_MSG_BUFFER_SIZE];
...
@@ -62,7 +62,7 @@ msg_t msg_buffer[TRANSCEIVER_MSG_BUFFER_SIZE];
uint32_t
response
;
///< response bytes for messages to upper layer threads
uint32_t
response
;
///< response bytes for messages to upper layer threads
int
transceiver_pid
;
///< the transceiver thread's pid
int
transceiver_pid
=
-
1
;
///< the transceiver thread's pid
static
volatile
uint8_t
rx_buffer_pos
=
0
;
static
volatile
uint8_t
rx_buffer_pos
=
0
;
static
volatile
uint8_t
transceiver_buffer_pos
=
0
;
static
volatile
uint8_t
transceiver_buffer_pos
=
0
;
...
@@ -107,6 +107,11 @@ void transceiver_init(transceiver_type_t t)
...
@@ -107,6 +107,11 @@ void transceiver_init(transceiver_type_t t)
{
{
uint8_t
i
;
uint8_t
i
;
if
(
transceiver_pid
>=
0
)
{
/* do not re-initialize an already running transceiver */
return
;
}
/* Initializing transceiver buffer and data buffer */
/* Initializing transceiver buffer and data buffer */
memset
(
transceiver_buffer
,
0
,
TRANSCEIVER_BUFFER_SIZE
);
memset
(
transceiver_buffer
,
0
,
TRANSCEIVER_BUFFER_SIZE
);
memset
(
data_buffer
,
0
,
TRANSCEIVER_BUFFER_SIZE
*
PAYLOAD_SIZE
);
memset
(
data_buffer
,
0
,
TRANSCEIVER_BUFFER_SIZE
*
PAYLOAD_SIZE
);
...
...
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