Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples/lorawan: fix semtech_loramac_send TX ret code [backport 2019.07] #11873

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/lorawan/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static void _send_message(void)
/* Try to send the message */
uint8_t ret = semtech_loramac_send(&loramac,
(uint8_t *)message, strlen(message));
if (ret != SEMTECH_LORAMAC_TX_OK) {
if (ret != SEMTECH_LORAMAC_TX_DONE) {
printf("Cannot send message '%s', ret code: %d\n", message, ret);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/semtech-loramac/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
* /* 4. send some data */
* char *message = "This is RIOT";
* if (semtech_loramac_send(&loramac,
* (uint8_t *)message, strlen(message)) != SEMTECH_LORAMAC_TX_OK) {
* (uint8_t *)message, strlen(message)) != SEMTECH_LORAMAC_TX_DONE) {
printf("Cannot send message '%s'\n", message);
* return 1;
* }
Expand Down
4 changes: 2 additions & 2 deletions pkg/semtech-loramac/include/semtech_loramac.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,15 @@ uint8_t semtech_loramac_join(semtech_loramac_t *mac, uint8_t type);
* 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.
* @ref SEMTECH_LORAMAC_TX_DONE 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_TX_DONE when the message was 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_DUTYCYCLE_RESTRICTED when the send is rejected because of dutycycle restriction
Expand Down