peripheral.c: initialize common members only

Other members will be initialized according to peripheral configuration.
This commit is contained in:
Xavier Del Campo Romero 2022-06-26 19:51:13 +02:00
parent f938bb790e
commit 2c5973ee7e
1 changed files with 1 additions and 1 deletions

View File

@ -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)
{