initial_pins: Add compile time check to reduce binary size when not in use

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor authored and Eric Callahan committed 2022-05-16 17:01:52 -04:00
1 parent d6c874b0ad
commit e8374ce367
1 file changed
+2
+2
View File
@@ -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];