cfg_i2c_default.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2014-2016 Freie Universität Berlin
3  * SPDX-FileCopyrightText: 2015 Zolertia SL
4  * SPDX-License-Identifier: LGPL-2.1-only
5  */
6 
7 #pragma once
8 
21 #include "periph_cpu.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
31 #define I2C_IRQ_PRIO 1
32 
33 static const i2c_conf_t i2c_config[] = {
34  {
36  .scl_pin = GPIO_PIN(PORT_C, 3),
37  .sda_pin = GPIO_PIN(PORT_C, 2)
38  },
39 };
40 
41 #define I2C_NUMOF ARRAY_SIZE(i2c_config)
44 #ifdef __cplusplus
45 } /* end extern "C" */
46 #endif
47 
@ 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