Skip to content
Merged
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
17 changes: 7 additions & 10 deletions ch10.md
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ status notification.
```c
/* Status bits used by the cloud write operation. */
#define SEND_SUCCESSFUL_BIT ( 0x01 << 0 )
define OPERATION_TIMED_OUT_BIT ( 0x01 << 1 )
#define OPERATION_TIMED_OUT_BIT ( 0x01 << 1 )
#define NO_INTERNET_CONNECTION_BIT ( 0x01 << 2 )
#define CANNOT_LOCATE_CLOUD_SERVER_BIT ( 0x01 << 3 )

Expand Down Expand Up @@ -1529,16 +1529,13 @@ uint32_t CloudWrite( uint32_t ulDataID, uint32_t ulDataValue )
a bitwise status code into this task's notification value, which is
written to ulNotificationValue. */
xTaskNotifyWait( 0, /* No bits cleared on entry. */
CLOUD_WRITE_STATUS_BIT_MASK, /* Clear relevant bits to 0 on exit. */
&ulNotificationValue, /* Notified value. */
pdMS_TO_TICKS( 250 ) ); /* Wait a maximum of 250ms. */

CLOUD_WRITE_STATUS_BIT_MASK, /* Clear relevant bits to 0 on exit. */

&ulNotificationValue, /* Notified value. */

pdMS_TO_TICKS( 250 ) ); /* Wait a maximum of 250ms. */

/* Return the status code to the calling task. */

return ( ulNotificationValue & CLOUD_WRITE_STATUS_BIT_MASK );
/* Return the status code to the calling task. */
return ( ulNotificationValue & CLOUD_WRITE_STATUS_BIT_MASK );
}
```

***Listing 10.17*** *The Implementation of the Cloud Write API Function*
Expand Down