Skip to content

Commit 66be3cc

Browse files
committed
[EFR32] get free heap size
1 parent f912352 commit 66be3cc

1 file changed

Lines changed: 1 addition & 36 deletions

File tree

  • software/firmware/source/SoftRF/src/platform

software/firmware/source/SoftRF/src/platform/EFR32.cpp

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -70,41 +70,6 @@ static struct rst_info reset_info = {
7070
static uint32_t bootCount __attribute__ ((section (".noinit")));
7171
static bool wdt_is_active = false;
7272

73-
#if 0
74-
char* ultoa(unsigned long value, char *string, int radix)
75-
{
76-
char tmp[33];
77-
char *tp = tmp;
78-
long i;
79-
unsigned long v = value;
80-
char *sp;
81-
if ( string == NULL )
82-
{
83-
return 0;
84-
}
85-
if (radix > 36 || radix <= 1)
86-
{
87-
return 0;
88-
}
89-
90-
while (v || tp == tmp)
91-
{
92-
i = v % radix;
93-
v = v / radix;
94-
if (i < 10)
95-
*tp++ = i+'0';
96-
else
97-
*tp++ = i + 'a' - 10;
98-
}
99-
sp = string;
100-
101-
while (tp > tmp)
102-
*sp++ = *--tp;
103-
*sp = 0;
104-
return string;
105-
}
106-
#endif
107-
10873
#if (__GNUC__ <= 9)
10974
volatile int __sf;
11075
#endif
@@ -393,7 +358,7 @@ static String EFR32_getResetReason()
393358

394359
static uint32_t EFR32_getFreeHeap()
395360
{
396-
return 0; /* TODO */
361+
return (uint32_t) getFreeHeapSize();
397362
}
398363

399364
static long EFR32_random(long howsmall, long howBig)

0 commit comments

Comments
 (0)