RTEMS
5.0.0
bsps
arm
xilinx-zynq
include
bsp
i2c.h
1
/*
2
* Copyright (c) 2014 embedded brains GmbH. All rights reserved.
3
*
4
* embedded brains GmbH
5
* Dornierstr. 4
6
* 82178 Puchheim
7
* Germany
8
* <info@embedded-brains.de>
9
*
10
* The license and distribution terms for this file may be
11
* found in the file LICENSE in this distribution or at
12
* http://www.rtems.org/license/LICENSE.
13
*/
14
15
#ifndef LIBBSP_ARM_XILINX_ZYNQ_I2C_H
16
#define LIBBSP_ARM_XILINX_ZYNQ_I2C_H
17
18
#include <bsp/cadence-i2c.h>
19
#include <bsp/irq.h>
20
#include <bsp.h>
21
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
/* __cplusplus */
25
26
static
inline
int
zynq_register_i2c_0(
void
)
27
{
28
return
i2c_bus_register_cadence(
29
"/dev/i2c-0"
,
30
0xe0004000,
31
zynq_clock_cpu_1x(),
32
ZYNQ_IRQ_I2C_0
33
);
34
}
35
36
static
inline
int
zynq_register_i2c_1(
void
)
37
{
38
return
i2c_bus_register_cadence(
39
"/dev/i2c-1"
,
40
0xe0005000,
41
zynq_clock_cpu_1x(),
42
ZYNQ_IRQ_I2C_1
43
);
44
}
45
46
#ifdef __cplusplus
47
}
48
#endif
/* __cplusplus */
49
50
#endif
/* LIBBSP_ARM_XILINX_ZYNQ_I2C_H */
Generated by
1.8.13