File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/rp2_common/pico_cyw43_driver Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,15 @@ static uint32_t counter = 0;
80
80
81
81
//#define SWAP32(A) ((((A) & 0xff000000U) >> 8) | (((A) & 0xff0000U) << 8) | (((A) & 0xff00U) >> 8) | (((A) & 0xffU) << 8))
82
82
__force_inline static uint32_t __swap16x2 (uint32_t a ) {
83
+ #ifndef __riscv
83
84
pico_default_asm ("rev16 %0, %0" : "+ l " (a) : : );
85
+ #else
86
+ uint32_t tmp ;
87
+ pico_default_asm (
88
+ "rev8 %1, %0\n"
89
+ "rori %0, %1, 16\n"
90
+ : "+l" (a ), "=l" (tmp ));
91
+ #endif
84
92
return a ;
85
93
}
86
94
#define SWAP32 (a ) __swap16x2(a)
@@ -596,4 +604,4 @@ uint cyw43_get_pin_wl(cyw43_pin_index_t pin_id) {
596
604
assert (cyw43_pin_array [pin_id ] < NUM_BANK0_GPIOS );
597
605
return cyw43_pin_array [pin_id ];
598
606
}
599
- #endif // CYW43_PIN_WL_DYNAMIC
607
+ #endif // CYW43_PIN_WL_DYNAMIC
You can’t perform that action at this time.
0 commit comments