You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/01/05 13:05:40 UTC
[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4530: drivers/mmcsd: Add RPMB ioctl
gustavonihei commented on a change in pull request #4530:
URL: https://github.com/apache/incubator-nuttx/pull/4530#discussion_r778802563
##########
File path: include/nuttx/mmcsd.h
##########
@@ -27,6 +27,47 @@
#include <nuttx/config.h>
+#include <stdint.h>
+#include <nuttx/fs/ioctl.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* mmcsd ioctl */
+
+#define MMC_RPMB_TRANSFER _MMCSDIOC(0x0000)
+
+/* rpmb request */
+
+#define MMC_RPMB_WRITE_KEY 0x01
+#define MMC_RPMB_READ_CNT 0x02
+#define MMC_RPMB_WRITE 0x03
+#define MMC_RPMB_READ 0x04
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+struct mmc_rpmb_frame_s
+{
+ uint8_t stuff[196];
+ uint8_t key_mac[32];
+ uint8_t data[256];
+ uint8_t nonce[16];
+ uint32_t write_counter;
+ uint16_t addr;
+ uint16_t block_count;
+ uint16_t result;
+ uint16_t req_resp;
+};
+
+struct mmc_rpmb_transfer_s
+{
+ unsigned int num_of_frames;
Review comment:
```suggestion
uint32_t num_of_frames;
```
Wouldn't it be more appropriate here to use a fixed-width type?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org