cfg_i2c_default.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014-2016 Freie Universität Berlin
3  * 2015 Zolertia SL
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
22 #ifndef CFG_I2C_DEFAULT_H
23 #define CFG_I2C_DEFAULT_H
24 
25 #include "periph_cpu.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 #define I2C_IRQ_PRIO 1
36 
37 static const i2c_conf_t i2c_config[] = {
38  {
40  .scl_pin = GPIO_PIN(PORT_C, 3),
41  .sda_pin = GPIO_PIN(PORT_C, 2)
42  },
43 };
44 
45 #define I2C_NUMOF ARRAY_SIZE(i2c_config)
46 
48 #ifdef __cplusplus
49 } /* end extern "C" */
50 #endif
51 
52 #endif /* CFG_I2C_DEFAULT_H */
53 
PORT_C
@ PORT_C
port C
Definition: periph_cpu.h:38
GPIO_PIN
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35
i2c_conf_t::speed
i2c_speed_t speed
baudrate used for the bus
Definition: periph_cpu.h:129
i2c_conf_t
I2C configuration options.
Definition: periph_cpu.h:128
I2C_SPEED_FAST
@ I2C_SPEED_FAST
fast mode: ~400 kbit/s
Definition: i2c.h:178