RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
bsps
arm
beagle
include
bsp
i2c.h
Go to the documentation of this file.
1
8
9
/*
10
* Copyright (c) 2012 Claas Ziemke. All rights reserved.
11
*
12
* Claas Ziemke
13
* Kernerstrasse 11
14
* 70182 Stuttgart
15
* Germany
16
* <claas.ziemke@gmx.net>
17
*
18
* The license and distribution terms for this file may be
19
* found in the file LICENSE in this distribution or at
20
* http://www.rtems.org/license/LICENSE.
21
*/
22
23
#ifndef LIBBSP_ARM_BEAGLE_I2C_H
24
#define LIBBSP_ARM_BEAGLE_I2C_H
25
26
#include <
rtems.h
>
27
#include <bsp.h>
28
#include <
dev/i2c/i2c.h
>
29
#include <
ofw/ofw.h
>
30
31
#ifdef __cplusplus
32
extern
"C"
{
33
#endif
/* __cplusplus */
34
35
#define BBB_I2C_SYSCLK 48000000
36
#define BBB_I2C_INTERNAL_CLK 12000000
37
38
#define BBB_I2C_0_BUS_PATH "/dev/i2c-0"
39
#define BBB_I2C_1_BUS_PATH "/dev/i2c-1"
40
#define BBB_I2C_2_BUS_PATH "/dev/i2c-2"
41
42
typedef
enum
{
43
I2C0,
44
I2C1,
45
I2C2,
46
I2C_COUNT
47
} bbb_i2c_id_t;
48
49
typedef
struct
i2c_regs
{
50
uint32_t BBB_I2C_REVNB_LO;
51
uint32_t BBB_I2C_REVNB_HI;
52
uint32_t dummy1[ 2 ];
53
uint32_t BBB_I2C_SYSC;
54
uint32_t dummy2[ 4 ];
55
uint32_t BBB_I2C_IRQSTATUS_RAW;
56
uint32_t BBB_I2C_IRQSTATUS;
57
uint32_t BBB_I2C_IRQENABLE_SET;
58
uint32_t BBB_I2C_IRQENABLE_CLR;
59
uint32_t BBB_I2C_WE;
60
uint32_t BBB_I2C_DMARXENABLE_SET;
61
uint32_t BBB_I2C_DMATXENABLE_SET;
62
uint32_t BBB_I2C_DMARXENABLE_CLR;
63
uint32_t BBB_I2C_DMATXENABLE_CLR;
64
uint32_t BBB_I2C_DMARXWAKE_EN;
65
uint32_t BBB_I2C_DMATXWAKE_EN;
66
uint32_t dummy3[ 16 ];
67
uint32_t BBB_I2C_SYSS;
68
uint32_t BBB_I2C_BUF;
69
uint32_t BBB_I2C_CNT;
70
uint32_t BBB_I2C_DATA;
71
uint32_t dummy4;
72
uint32_t BBB_I2C_CON;
73
uint32_t BBB_I2C_OA;
74
uint32_t BBB_I2C_SA;
75
uint32_t BBB_I2C_PSC;
76
uint32_t BBB_I2C_SCLL;
77
uint32_t BBB_I2C_SCLH;
78
uint32_t BBB_I2C_SYSTEST;
79
uint32_t BBB_I2C_BUFSTAT;
80
uint32_t BBB_I2C_OA1;
81
uint32_t BBB_I2C_OA2;
82
uint32_t BBB_I2C_OA3;
83
uint32_t BBB_I2C_ACTOA;
84
uint32_t BBB_I2C_SBLOCK;
85
} bbb_i2c_regs;
86
87
void
beagle_i2c_init(
phandle_t
node );
88
89
#ifdef __cplusplus
90
}
91
#endif
/* __cplusplus */
92
93
#endif
/* LIBBSP_ARM_BEAGLE_I2C_H */
i2c.h
Inter-Integrated Circuit (I2C) Driver API.
ofw.h
phandle_t
uint32_t phandle_t
Definition
ofw.h:56
rtems.h
This header file defines the RTEMS Classic API.
i2c_regs
Definition
i2c.h:49
Generated by
1.18.0