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
afc85e3d
Unverified
Commit
afc85e3d
authored
6 years ago
by
Alexandre Abadie
Browse files
Options
Downloads
Patches
Plain Diff
pkg/semtech-loramac: improve send and recv functions doc
parent
1f0b2c39
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
pkg/semtech-loramac/contrib/semtech_loramac.c
+3
-0
3 additions, 0 deletions
pkg/semtech-loramac/contrib/semtech_loramac.c
pkg/semtech-loramac/include/semtech_loramac.h
+11
-3
11 additions, 3 deletions
pkg/semtech-loramac/include/semtech_loramac.h
with
14 additions
and
3 deletions
pkg/semtech-loramac/contrib/semtech_loramac.c
+
3
−
0
View file @
afc85e3d
...
...
@@ -828,6 +828,9 @@ uint8_t semtech_loramac_send(semtech_loramac_t *mac, uint8_t *data, uint8_t len)
return
SEMTECH_LORAMAC_NOT_JOINED
;
}
/* Correctly set the caller pid */
mac
->
caller_pid
=
thread_getpid
();
loramac_send_params_t
params
;
params
.
payload
=
data
;
params
.
len
=
len
;
...
...
This diff is collapsed.
Click to expand it.
pkg/semtech-loramac/include/semtech_loramac.h
+
11
−
3
View file @
afc85e3d
...
...
@@ -149,17 +149,22 @@ uint8_t semtech_loramac_join(semtech_loramac_t *mac, uint8_t type);
/**
* @brief Sends data to the LoRaWAN network
*
* This function returns immediately and leave the mac in busy state until a
* message is received from the network (with RX1 and RX2 receive windows).
* This function returns after TX status is replied from the MAC. To receive
* potential messages sent from the network an explicit call to
* @ref semtech_loramac_recv must be done after this function if it returned
* @ref SEMTECH_LORAMAC_TX_OK and within the RX windows delays.
*
* @see semtech_loramac_recv
*
* @param[in] mac Pointer to the mac
* @param[in] data The TX data
* @param[in] len The length of the TX data
*
* @return SEMTECH_LORAMAC_TX_OK when the message can be transmitted
* @return SEMTECH_LORAMAC_NOT_JOINED when the network is not joined
* @return SEMTECH_LORAMAC_BUSY when the mac is already active (join or tx in progress)
* @return SEMTECH_LORAMAC_TX_SCHEDULED when the TX is scheduled in the mac
* @return SEMTECH_LORAMAC_DUTYCYCLE_RESTRICTED when the send is rejected because of dutycycle restriction
* @return SEMTECH_LORAMAC_TX_ERROR when an invalid parameter is given
*/
uint8_t
semtech_loramac_send
(
semtech_loramac_t
*
mac
,
uint8_t
*
data
,
uint8_t
len
);
...
...
@@ -172,6 +177,9 @@ uint8_t semtech_loramac_send(semtech_loramac_t *mac, uint8_t *data, uint8_t len)
* class C device, a message can be received at any time. In this case, this
* function can be used in a dedicated listener thread.
*
* Be sure to call this function before the end of the RX windows otherwise it
* may block the calling thread.
*
* @see semtech_loramac_send
*
* @param[in] mac Pointer to the mac
...
...
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