1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-20 03:53:49 +01:00
RIOT/boards/common/nrf52/include/cfg_i2c_default.h
2025-07-18 14:23:37 +02:00

53 lines
821 B
C

/*
* SPDX-FileCopyrightText: 2016-2018 Freie Universität Berlin
* SPDX-License-Identifier: LGPL-2.1-only
*/
#pragma once
/**
* @ingroup boards_common_nrf52
* @{
*
* @file
* @brief Default I2C config for nRF52 based boards
*
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*
*/
#include "periph_cpu.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name I2C configuration
* @{
*/
static const i2c_conf_t i2c_config[] = {
{
.dev = NRF_TWIM1,
.scl = 27,
.sda = 26,
.speed = I2C_SPEED_NORMAL
},
#ifdef BOARD_NRF52840DK
{
.dev = NRF_TWIM0,
.scl = 28,
.sda = 29,
.speed = I2C_SPEED_NORMAL
}
#endif
};
#define I2C_NUMOF ARRAY_SIZE(i2c_config)
/** @} */
#ifdef __cplusplus
}
#endif
/** @} */