Skip to content

Commit 8fea0fd

Browse files
committed
redefine OPEN_MAX from sys_limits for ZG and HG because they are RAM-limited parts, and in doing so, we save about 200 bytes of RAM.
1 parent e06fc12 commit 8fea0fd

File tree

2 files changed

+10
-0
lines changed
  • libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32

2 files changed

+10
-0
lines changed

libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32HG_STK3400/device.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050

5151
#define DEVICE_LOWPOWERTIMER 1
5252

53+
// Redefine OPEN_MAX from sys_limits.h to save on RAM.
54+
// Effect: maximum amount of file handlers = OPEN_MAX
55+
// This is not going to have an impact, since this is a RAM-limited part anyway.
56+
#define OPEN_MAX 24
57+
5358
#include "objects.h"
5459
#include "Modules.h"
5560
#include "device_peripherals.h"

libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32ZG_STK3200/device.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050

5151
#define DEVICE_LOWPOWERTIMER 1
5252

53+
// Redefine OPEN_MAX from sys_limits.h to save on RAM.
54+
// Effect: maximum amount of file handlers = OPEN_MAX
55+
// This is not going to have an impact, since this is a RAM-limited part anyway.
56+
#define OPEN_MAX 8
57+
5358
#include "objects.h"
5459
#include "Modules.h"
5560
#include "device_peripherals.h"

0 commit comments

Comments
 (0)