@@ -1490,7 +1490,7 @@ status notification.
14901490``` c
14911491/* Status bits used by the cloud write operation. */
14921492#define SEND_SUCCESSFUL_BIT ( 0x01 << 0 )
1493- define OPERATION_TIMED_OUT_BIT ( 0x01 << 1 )
1493+ # define OPERATION_TIMED_OUT_BIT ( 0x01 << 1 )
14941494#define NO_INTERNET_CONNECTION_BIT ( 0x01 << 2 )
14951495#define CANNOT_LOCATE_CLOUD_SERVER_BIT ( 0x01 << 3 )
14961496
@@ -1529,16 +1529,13 @@ uint32_t CloudWrite( uint32_t ulDataID, uint32_t ulDataValue )
15291529 a bitwise status code into this task's notification value, which is
15301530 written to ulNotificationValue. */
15311531 xTaskNotifyWait( 0, /* No bits cleared on entry. */
1532+ CLOUD_WRITE_STATUS_BIT_MASK, /* Clear relevant bits to 0 on exit. */
1533+ &ulNotificationValue, /* Notified value. */
1534+ pdMS_TO_TICKS( 250 ) ); /* Wait a maximum of 250ms. */
15321535
1533- CLOUD_WRITE_STATUS_BIT_MASK, /* Clear relevant bits to 0 on exit. * /
1534-
1535- &ulNotificationValue, /* Notified value. * /
1536-
1537- pdMS_TO_TICKS( 250 ) ); /* Wait a maximum of 250ms. * /
1538-
1539- /* Return the status code to the calling task. * /
1540-
1541- return ( ulNotificationValue & CLOUD_WRITE_STATUS_BIT_MASK );
1536+ /* Return the status code to the calling task. */
1537+ return ( ulNotificationValue & CLOUD_WRITE_STATUS_BIT_MASK );
1538+ }
15421539```
15431540
15441541***Listing 10.17*** *The Implementation of the Cloud Write API Function*
0 commit comments