mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-02 19:29:30 +00:00
Integrate I2C driver into board initializzation
This patch add I2C initializzation for board with I2C devices. Signed-off-by: Maria Laura Stefanizzi <laura28582@gmail.com>
This commit is contained in:
parent
c7b1248aac
commit
a9c0768fd6
@ -77,6 +77,7 @@
|
|||||||
#include "hal/micro/cortexm3/mfg-token.h"
|
#include "hal/micro/cortexm3/mfg-token.h"
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "dev/i2c.h"
|
||||||
|
|
||||||
const LedResourceType LedsMB851A[] = {
|
const LedResourceType LedsMB851A[] = {
|
||||||
{
|
{
|
||||||
@ -496,6 +497,7 @@ void halBoardPowerUp(void)
|
|||||||
if ((boardDescription->flags & BOARD_HAS_MEMS) || (boardDescription->flags & BOARD_HAS_EEPROM)) {
|
if ((boardDescription->flags & BOARD_HAS_MEMS) || (boardDescription->flags & BOARD_HAS_EEPROM)) {
|
||||||
halGpioConfig(PORTA_PIN(1), GPIOCFG_OUT_ALT_OD);
|
halGpioConfig(PORTA_PIN(1), GPIOCFG_OUT_ALT_OD);
|
||||||
halGpioConfig(PORTA_PIN(2), GPIOCFG_OUT_ALT_OD);
|
halGpioConfig(PORTA_PIN(2), GPIOCFG_OUT_ALT_OD);
|
||||||
|
i2c_enable();
|
||||||
}
|
}
|
||||||
/* Configure GPIO for ADC access (temp sensor) */
|
/* Configure GPIO for ADC access (temp sensor) */
|
||||||
if (boardDescription->flags & BOARD_HAS_TEMP_SENSOR) {
|
if (boardDescription->flags & BOARD_HAS_TEMP_SENSOR) {
|
||||||
|
Loading…
Reference in New Issue
Block a user