1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
/**
* @file
*
* @ingroup RTEMSBSPsARMCycVI2C
*/
/*
* Copyright (c) 2014 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Dornierstr. 4
* 82178 Puchheim
* Germany
* <info@embedded-brains.de>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#ifndef I2CDRV_H
#define I2CDRV_H
#include <rtems.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/**
* @defgroup RTEMSBSPsARMCycVI2C I2C Driver
*
* @ingroup RTEMSBSPsARMCycV
*
* @brief I2C Driver.
*
* @{
*/
rtems_device_driver i2cdrv_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg
);
rtems_device_driver i2cdrv_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg
);
rtems_device_driver i2cdrv_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg
);
rtems_device_driver i2cdrv_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg
);
rtems_device_driver i2cdrv_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg
);
rtems_device_driver i2cdrv_ioctl(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg
);
#define I2C_DRIVER_TABLE_ENTRY \
{ \
i2cdrv_initialize, \
i2cdrv_open, \
i2cdrv_close, \
i2cdrv_read, \
i2cdrv_write, \
i2cdrv_ioctl \
}
#define I2C_IOC_SET_SLAVE_ADDRESS 1
/** @} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* I2CDRV_H */
|