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 
10 #pragma once
11 
24 #include "periph_cpu.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34 #define I2C_IRQ_PRIO 1
35 
36 static const i2c_conf_t i2c_config[] = {
37  {
39  .scl_pin = GPIO_PIN(PORT_C, 3),
40  .sda_pin = GPIO_PIN(PORT_C, 2)
41  },
42 };
43 
44 #define I2C_NUMOF ARRAY_SIZE(i2c_config)
47 #ifdef __cplusplus
48 } /* end extern "C" */
49 #endif
50 
@ PORT_C
port C
Definition: periph_cpu.h:48
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:45
static const i2c_conf_t i2c_config[]
Default I2C device configuration.
@ I2C_SPEED_FAST
fast mode: ~400 kbit/s
Definition: periph_cpu.h:278
I2C configuration structure.
Definition: periph_cpu.h:298
i2c_speed_t speed
Configured bus speed, actual speed may be lower but never higher.
Definition: periph_cpu.h:303