Skip to content

Commit 725d721

Browse files
Add missing bracket in Ch 10 (#87)
* Add missing bracket in Ch 10 * Fix formatting of the code block Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
1 parent 46f033e commit 725d721

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

ch10.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)