boards/mcb2388: add I2C config
The pins for I2C0 and I2C1 are available on the board, nothing is wired up to them.
This commit is contained in:
parent
4d5d3eb9e6
commit
9d1a2b5fb4
@ -3,6 +3,7 @@ CPU_MODEL = lpc2388
|
|||||||
|
|
||||||
# Put defined MCU peripherals here (in alphabetical order)
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
FEATURES_PROVIDED += periph_adc
|
FEATURES_PROVIDED += periph_adc
|
||||||
|
FEATURES_PROVIDED += periph_i2c
|
||||||
FEATURES_PROVIDED += periph_rtc
|
FEATURES_PROVIDED += periph_rtc
|
||||||
FEATURES_PROVIDED += periph_spi
|
FEATURES_PROVIDED += periph_spi
|
||||||
FEATURES_PROVIDED += periph_timer
|
FEATURES_PROVIDED += periph_timer
|
||||||
|
|||||||
@ -101,6 +101,33 @@ static const adc_conf_t adc_config[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define ADC_NUMOF (1)
|
#define ADC_NUMOF (1)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name I2C configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static const i2c_conf_t i2c_config[] = {
|
||||||
|
{
|
||||||
|
.dev = I2C0,
|
||||||
|
.speed = I2C_SPEED_NORMAL,
|
||||||
|
.irq_prio = 5,
|
||||||
|
.pinsel_sda = 1,
|
||||||
|
.pinsel_scl = 1,
|
||||||
|
.pinsel_msk_sda = BIT22, /* P0.27 */
|
||||||
|
.pinsel_msk_scl = BIT24, /* P0.28 */
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.dev = I2C1,
|
||||||
|
.speed = I2C_SPEED_NORMAL,
|
||||||
|
.irq_prio = 5,
|
||||||
|
.pinsel_sda = 1,
|
||||||
|
.pinsel_scl = 1,
|
||||||
|
.pinsel_msk_sda = BIT6 | BIT7, /* P0.19 */
|
||||||
|
.pinsel_msk_scl = BIT8 | BIT9, /* P0.20 */
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
#define I2C_NUMOF (2)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user