From 2c5973ee7e127dc114e668d10a42fef83e677f46 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sun, 26 Jun 2022 19:51:13 +0200 Subject: peripheral.c: initialize common members only Other members will be initialized according to peripheral configuration. --- src/peripheral/src/peripheral.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peripheral/src/peripheral.c b/src/peripheral/src/peripheral.c index c461573..eeec4fa 100644 --- a/src/peripheral/src/peripheral.c +++ b/src/peripheral/src/peripheral.c @@ -43,7 +43,7 @@ void peripheral_update(union peripheral *const p) void peripheral_init(const struct peripheral_cfg *const cfg, union peripheral *const p) { - *p = (const union peripheral){0}; + p->common = (const struct peripheral_common){0}; switch (p->common.type = cfg->type) { -- cgit v1.2.3