From b5ef6f94cb3dcecd67fede87645344e827a3e667 Mon Sep 17 00:00:00 2001 From: kar-rahul-aws Date: Thu, 11 Apr 2024 14:54:03 +0530 Subject: [PATCH 1/2] Add missing bracket in Ch 10 --- ch10.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ch10.md b/ch10.md index 5c67efb..e2a56d4 100644 --- a/ch10.md +++ b/ch10.md @@ -1539,6 +1539,7 @@ pdMS_TO_TICKS( 250 ) ); /* Wait a maximum of 250ms. */ /* 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* From af1e0d3c9e75dfd72ee21a2d0229986f0e472aef Mon Sep 17 00:00:00 2001 From: Gaurav Aggarwal Date: Mon, 15 Apr 2024 18:41:31 +0000 Subject: [PATCH 2/2] Fix formatting of the code block Signed-off-by: Gaurav Aggarwal --- ch10.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/ch10.md b/ch10.md index e2a56d4..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,12 @@ 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 ); } ```