Skip to content

Commit de25b5e

Browse files
committed
Make "reverse" noniso conditional on ESP_DSP
1 parent be2a341 commit de25b5e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

cores/esp32/stdlib_noniso.c

+17
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,23 @@
2828
#include <stdint.h>
2929
#include <math.h>
3030
#include "stdlib_noniso.h"
31+
#include "esp_system.h"
32+
33+
#if !CONFIG_DSP_ANSI && !CONFIG_DSP_OPTIMIZED
34+
void reverse(char* begin, char* end) {
35+
char *is = begin;
36+
char *ie = end - 1;
37+
while(is < ie) {
38+
char tmp = *ie;
39+
*ie = *is;
40+
*is = tmp;
41+
++is;
42+
--ie;
43+
}
44+
}
45+
#else
46+
void reverse(char* begin, char* end);
47+
#endif
3148

3249
char* ltoa(long value, char* result, int base) {
3350
if(base < 2 || base > 16) {

0 commit comments

Comments
 (0)