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:
Maria Laura Stefanizzi 2013-11-20 14:05:15 +01:00
parent c7b1248aac
commit a9c0768fd6

View File

@ -77,6 +77,7 @@
#include "hal/micro/cortexm3/mfg-token.h"
#endif
#include <string.h>
#include "dev/i2c.h"
const LedResourceType LedsMB851A[] = {
{
@ -496,6 +497,7 @@ void halBoardPowerUp(void)
if ((boardDescription->flags & BOARD_HAS_MEMS) || (boardDescription->flags & BOARD_HAS_EEPROM)) {
halGpioConfig(PORTA_PIN(1), GPIOCFG_OUT_ALT_OD);
halGpioConfig(PORTA_PIN(2), GPIOCFG_OUT_ALT_OD);
i2c_enable();
}
/* Configure GPIO for ADC access (temp sensor) */
if (boardDescription->flags & BOARD_HAS_TEMP_SENSOR) {