gustavonihei commented on a change in pull request #4787:
URL: https://github.com/apache/incubator-nuttx/pull/4787#discussion_r745593730



##########
File path: arch/risc-v/src/esp32c3/esp32c3_wireless.c
##########
@@ -29,9 +29,17 @@
 
 #include "hardware/esp32c3_soc.h"
 #include "hardware/esp32c3_syscon.h"
+#include "esp32c3_wireless.h"
 #include "esp32c3.h"
 #include "espidf_wifi.h"
 
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define MAC_ADDR0_REG (DR_REG_EFUSE_BASE + 0x044)
+#define MAC_ADDR1_REG (DR_REG_EFUSE_BASE + 0x048)

Review comment:
       ```suggestion
   #define MAC_ADDR0_REG EFUSE_RD_MAC_SPI_SYS_0_REG
   #define MAC_ADDR1_REG EFUSE_RD_MAC_SPI_SYS_1_REG
   ```
   It is best to reuse the definitions from 
https://github.com/apache/incubator-nuttx/blob/master/arch/risc-v/src/esp32c3/hardware/esp32c3_efuse.h#L815
   Or even use it directly in the function.
   

##########
File path: arch/risc-v/src/esp32c3/esp32c3_wireless.c
##########
@@ -29,9 +29,17 @@
 
 #include "hardware/esp32c3_soc.h"
 #include "hardware/esp32c3_syscon.h"
+#include "esp32c3_wireless.h"
 #include "esp32c3.h"
 #include "espidf_wifi.h"
 
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define MAC_ADDR0_REG (DR_REG_EFUSE_BASE + 0x044)
+#define MAC_ADDR1_REG (DR_REG_EFUSE_BASE + 0x048)

Review comment:
       ```suggestion
   #define MAC_ADDR0_REG EFUSE_RD_MAC_SPI_SYS_0_REG
   #define MAC_ADDR1_REG EFUSE_RD_MAC_SPI_SYS_1_REG
   ```
   It is best to reuse the definitions from 
https://github.com/apache/incubator-nuttx/blob/master/arch/risc-v/src/esp32c3/hardware/esp32c3_efuse.h#L815
   Or even use them directly in the function.
   




-- 
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-unsubscr...@nuttx.apache.org

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


Reply via email to