Loading...
Searching...
No Matches
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
20#ifndef CFG_I2C_DEFAULT_H
21#define CFG_I2C_DEFAULT_H
22
23#include "periph_cpu.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33static const i2c_conf_t i2c_config[] = {
34 {
35 .dev = NRF_TWIM1,
36 .scl = 27,
37 .sda = 26,
38 .speed = I2C_SPEED_NORMAL
39 },
40#ifdef BOARD_NRF52840DK
41 {
42 .dev = NRF_TWIM0,
43 .scl = 28,
44 .sda = 29,
45 .speed = I2C_SPEED_NORMAL
46 }
47#endif
48};
49#define I2C_NUMOF ARRAY_SIZE(i2c_config)
52#ifdef __cplusplus
53}
54#endif
55
56#endif /* CFG_I2C_DEFAULT_H */
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
Definition periph_cpu.h:278
static const i2c_conf_t i2c_config[]
Default I2C device configuration.
I2C configuration structure.
Definition periph_cpu.h:299
TWI_t * dev
Pointer to hardware module registers.
Definition periph_cpu.h:300