Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/efm32: fix i2c transfers #15764

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion boards/sltb001a/board.c
Expand Up @@ -22,6 +22,7 @@
#include "board.h"
#include "board_common.h"
#include "periph/gpio.h"
#include "xtimer.h"

#ifdef MODULE_SILABS_PIC
#include "pic.h"
Expand All @@ -35,8 +36,15 @@ void board_init(void)
#ifndef RIOTBOOT
/* perform common board initialization */
board_common_init();
#endif
}

void board_late_init(void)
{
#ifdef MODULE_SILABS_PIC
/* PIC requires xtimer for timing */
xtimer_init();

#ifdef MODULE_CCS811
/* enable the CCS811 air quality/gas sensor */
pic_write(CCS811_PIC_ADDR, (1 << CCS811_PIC_EN_BIT) | (1 << CCS811_PIC_WAKE_BIT));
Expand All @@ -62,5 +70,4 @@ void board_init(void)
(RGB_LED4_ENABLED << RGB_LED4_EN_BIT));
#endif
#endif
#endif
}
3 changes: 3 additions & 0 deletions core/init.c
Expand Up @@ -46,6 +46,9 @@ static void *main_trampoline(void *arg)
{
(void)arg;

extern void board_late_init(void);
board_late_init();

#ifdef MODULE_AUTO_INIT
auto_init();
#endif
Expand Down