Loading...
Searching...
No Matches
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
28extern "C" {
29#endif
30
35#define I2C_IRQ_PRIO 1
36
37static 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)
48#ifdef __cplusplus
49} /* end extern "C" */
50#endif
51
52#endif /* CFG_I2C_DEFAULT_H */
@ PORT_C
port C
Definition periph_cpu.h:49
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
@ I2C_SPEED_FAST
fast mode: ~400 kbit/s
Definition periph_cpu.h:279
static const i2c_conf_t i2c_config[]
Default I2C device configuration.
I2C configuration structure.
Definition periph_cpu.h:299
i2c_speed_t speed
Configured bus speed, actual speed may be lower but never higher.
Definition periph_cpu.h:304