cfg_i2c_default.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2016-2018 Freie Universität Berlin
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
19 #include "periph_cpu.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
29 static const i2c_conf_t i2c_config[] = {
30  {
31  .dev = NRF_TWIM1,
32  .scl = 27,
33  .sda = 26,
34  .speed = I2C_SPEED_NORMAL
35  },
36 #ifdef BOARD_NRF52840DK
37  {
38  .dev = NRF_TWIM0,
39  .scl = 28,
40  .sda = 29,
41  .speed = I2C_SPEED_NORMAL
42  }
43 #endif
44 };
45 #define I2C_NUMOF ARRAY_SIZE(i2c_config)
48 #ifdef __cplusplus
49 }
50 #endif
51 
static const i2c_conf_t i2c_config[]
Default I2C device configuration.
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
Definition: periph_cpu.h:277
I2C configuration structure.
Definition: periph_cpu.h:298
TWI_t * dev
Pointer to hardware module registers.
Definition: periph_cpu.h:299