diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2022-12-16 22:46:47 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2022-12-16 22:46:47 -0500 |
commit | 3c1ed3bb2731b49249d6aaacf01248783e4c8bf6 (patch) | |
tree | ff3feee8a365d1a103f3718cfa24c79a59559cfc /src/initial_pins.c | |
parent | 0c43ae1fd4d3dc245038b39afe55197c9397f100 (diff) | |
download | kutter-3c1ed3bb2731b49249d6aaacf01248783e4c8bf6.tar.gz kutter-3c1ed3bb2731b49249d6aaacf01248783e4c8bf6.tar.xz kutter-3c1ed3bb2731b49249d6aaacf01248783e4c8bf6.zip |
initial_pins: Add check to reduce compile time size when not in use
Add a check to the start of initial_pins_setup() to make it easier for
gcc to optimize the code if it is not in use.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/initial_pins.c')
-rw-r--r-- | src/initial_pins.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/initial_pins.c b/src/initial_pins.c index cd478508..af01b3ac 100644 --- a/src/initial_pins.c +++ b/src/initial_pins.c @@ -16,6 +16,8 @@ DECL_CTR("DECL_INITIAL_PINS " __stringify(CONFIG_INITIAL_PINS)); void initial_pins_setup(void) { + if (sizeof(CONFIG_INITIAL_PINS) <= 1) + return; int i; for (i=0; i<initial_pins_size; i++) { const struct initial_pin_s *ip = &initial_pins[i]; |