sjanc commented on code in PR #2888:
URL: https://github.com/apache/mynewt-core/pull/2888#discussion_r982853107


##########
hw/mcu/microchip/pic32mz/src/system_pic32.c:
##########
@@ -42,6 +42,27 @@ static inline int PLL_ODIV(int n)
 
 uint32_t SystemCoreClock;
 
+#if __PIC32_HAS_L1CACHE
+void
+dcache_flush_area(void *addr, int size)
+{
+    uint32_t a = (uint32_t)(addr) & ~3;
+    for (; size > 0; --size, a += 4) {
+        _cache(17, (void *)a);
+    }
+}
+
+void
+dcache_flush(void)
+{
+    for (int i = 0; i < 64; ++i) {

Review Comment:
   nitpicking : variables to be declared at beginning of 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to