diff --git a/ch10.md b/ch10.md index 5c67efb..05ddb48 100644 --- a/ch10.md +++ b/ch10.md @@ -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 ) @@ -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*