You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2021/06/05 20:53:38 UTC

[GitHub] [mynewt-core] vikrant-proxy commented on a change in pull request #2611: hw/drivers/spiram: Fix 4 bytes address handling

vikrant-proxy commented on a change in pull request #2611:
URL: https://github.com/apache/mynewt-core/pull/2611#discussion_r646035100



##########
File path: hw/drivers/ram/spiram/src/spiram.c
##########
@@ -102,7 +102,7 @@ spiram_write_enable(struct spiram_dev *dev)
 int
 spiram_read(struct spiram_dev *dev, uint32_t addr, void *buf, uint32_t size)
 {
-    uint8_t cmd[5] = { SPIRAM_READ };
+    uint8_t cmd[6] = { SPIRAM_READ };

Review comment:
       Given these parameters don't change on the fly, splitting these into 
   ```
   (1 + MYNEWT_VAL(SPIRAM_0_ADDRESS_BYTES) + MYNEWT_VAL(SPIRAM_0_DUMMY_BYTES)) 
   ```
   might make this more readable.
   @kasjer can we merge this soon




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org