mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
board/nz32-sc151: add missing I2C changes in periph_conf
This commit is contained in:
parent
0541b5c449
commit
365f72acd4
@ -196,20 +196,24 @@ static const spi_conf_t spi_config[] = {
|
||||
* @name I2C configuration
|
||||
* @{
|
||||
*/
|
||||
#define I2C_NUMOF (1)
|
||||
#define I2C_0_EN 1
|
||||
#define I2C_IRQ_PRIO 1
|
||||
#define I2C_APBCLK (36000000U) /* Configurable from 2MHz to 50Mhz, steps of 2Mhz */
|
||||
|
||||
/* I2C 0 device configuration */
|
||||
#define I2C_0_EVT_ISR isr_i2c1_ev
|
||||
#define I2C_0_ERR_ISR isr_i2c1_er
|
||||
|
||||
static const i2c_conf_t i2c_config[] = {
|
||||
/* device, port, scl-, sda-pin-number, I2C-AF, ER-IRQn, EV-IRQn */
|
||||
{I2C1, GPIO_PIN(PORT_B, 8), GPIO_PIN(PORT_B, 9),
|
||||
GPIO_OD_PU, GPIO_AF4, I2C1_ER_IRQn, I2C1_EV_IRQn}
|
||||
{
|
||||
.dev = I2C1,
|
||||
.speed = I2C_SPEED_NORMAL,
|
||||
.scl_pin = GPIO_PIN(PORT_B, 8),
|
||||
.sda_pin = GPIO_PIN(PORT_B, 9),
|
||||
.scl_af = GPIO_AF4,
|
||||
.sda_af = GPIO_AF4,
|
||||
.bus = APB1,
|
||||
.rcc_mask = RCC_APB1ENR_I2C1EN,
|
||||
.clk = CLOCK_APB1,
|
||||
.irqn = I2C1_EV_IRQn
|
||||
}
|
||||
};
|
||||
|
||||
#define I2C_0_ISR isr_i2c1_ev
|
||||
|
||||
#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user