mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-28 16:01:18 +01:00
boards/msba2: hook up i2c
I2C is not used by any chip on the board, but I2C2 is availiable on the JP3 connector (shared with UART2). - SDA: P0.10 - SCL: P0.11
This commit is contained in:
parent
937c954d92
commit
4d5d3eb9e6
@ -2,6 +2,7 @@ CPU = lpc2387
|
||||
|
||||
# Put defined MCU peripherals here (in alphabetical order)
|
||||
FEATURES_PROVIDED += periph_adc
|
||||
FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_pwm
|
||||
FEATURES_PROVIDED += periph_rtc
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
|
||||
@ -155,6 +155,25 @@ static const adc_conf_t adc_config[] = {
|
||||
#define ADC_NUMOF ARRAY_SIZE(adc_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name I2C configuration
|
||||
* @{
|
||||
*/
|
||||
static const i2c_conf_t i2c_config[] = {
|
||||
{ /* JP3 */
|
||||
.dev = I2C2,
|
||||
.speed = I2C_SPEED_NORMAL,
|
||||
.irq_prio = 5,
|
||||
.pinsel_sda = 0,
|
||||
.pinsel_scl = 0,
|
||||
.pinsel_msk_sda = BIT21, /* P0.10 */
|
||||
.pinsel_msk_scl = BIT23, /* P0.11 */
|
||||
},
|
||||
};
|
||||
|
||||
/* used in arithmetic preprocessor expression, so no ARRAY_SIZE() */
|
||||
#define I2C_NUMOF (1)
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user