cfg_i2c_default.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2018 Freie Universität Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
22 #include "periph_cpu.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32 static const i2c_conf_t i2c_config[] = {
33  {
34  .dev = NRF_TWIM1,
35  .scl = 27,
36  .sda = 26,
37  .speed = I2C_SPEED_NORMAL
38  },
39 #ifdef BOARD_NRF52840DK
40  {
41  .dev = NRF_TWIM0,
42  .scl = 28,
43  .sda = 29,
44  .speed = I2C_SPEED_NORMAL
45  }
46 #endif
47 };
48 #define I2C_NUMOF ARRAY_SIZE(i2c_config)
51 #ifdef __cplusplus
52 }
53 #endif
54 
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