kasjer commented on a change in pull request #2184: WIP DONOT MERGE: 
crypto/mbedtls: Enable AES and SECP256R1
URL: https://github.com/apache/mynewt-core/pull/2184#discussion_r382428197
 
 

 ##########
 File path: hw/drivers/trng/trng_da1469x/src/trng_da1469x.c
 ##########
 @@ -105,3 +106,20 @@ da1469x_trng_init(struct os_dev *dev, void *arg)
 
     return 0;
 }
+
+#ifdef MBEDTLS_ENTROPY_HARDWARE_ALT
+int
+mbedtls_hardware_poll( void *data, unsigned char *output, size_t len, size_t 
*olen ) {
+    struct trng_dev *trng;
+
+    trng = (struct trng_dev *)os_dev_lookup("trng");
+    da1469x_trng_init((struct os_dev *)trng, NULL);
+    int ret = da1469x_trng_read(trng, output, len);
 
 Review comment:
   in mynewt variable declaration are not placed in the middle of block

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to