VSF Documented
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
source
hal
driver
AIC
AIC8800
i2c
i2c.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* Copyright(C)2009-2022 by VSF Team *
3
* *
4
* Licensed under the Apache License, Version 2.0 (the "License"); *
5
* you may not use this file except in compliance with the License. *
6
* You may obtain a copy of the License at *
7
* *
8
* http://www.apache.org/licenses/LICENSE-2.0 *
9
* *
10
* Unless required by applicable law or agreed to in writing, software *
11
* distributed under the License is distributed on an "AS IS" BASIS, *
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13
* See the License for the specific language governing permissions and *
14
* limitations under the License. *
15
* *
16
****************************************************************************/
17
18
#ifndef __HAL_DRIVER_AIC8800_I2C_H__
19
#define __HAL_DRIVER_AIC8800_I2C_H__
20
21
/*============================ INCLUDES ======================================*/
22
23
#include "
hal/vsf_hal_cfg.h
"
24
25
#if VSF_HAL_USE_I2C == ENABLED
26
27
#include "../__device.h"
28
29
/*============================ MACROS ========================================*/
30
/*============================ TYPES =========================================*/
31
32
typedef
enum
vsf_i2c_cmd_t
{
33
VSF_I2C_CMD_WRITE
= (0x00ul << 3),
34
VSF_I2C_CMD_READ
= (0x01ul << 3),
35
36
VSF_I2C_CMD_START
= (0x01ul << 0),
37
VSF_I2C_CMD_RESTART
= (0x01ul << 21),
38
39
VSF_I2C_CMD_7_BITS
= (0x00ul << 23),
40
VSF_I2C_CMD_10_BITS
= (0x01ul << 23),
41
42
__I2C_CMD_HW_MASK
=
VSF_I2C_CMD_WRITE
|
43
VSF_I2C_CMD_READ
|
44
VSF_I2C_CMD_START
|
45
VSF_I2C_CMD_RESTART
,
46
47
VSF_I2C_CMD_NO_START
= (0x01ul << 24),
48
VSF_I2C_CMD_STOP
= (0x01ul << 25),
49
VSF_I2C_CMD_NO_STOP_RESTART
= (0x01ul << 26),
50
}
vsf_i2c_cmd_t
;
51
52
/*============================ INCLUDES ======================================*/
53
/*============================ TYPES =========================================*/
54
/*============================ INCLUDES ======================================*/
55
/*============================ GLOBAL VARIABLES ==============================*/
56
/*============================ LOCAL VARIABLES ===============================*/
57
/*============================ PROTOTYPES ====================================*/
58
/*============================ IMPLEMENTATION ================================*/
59
60
#endif
/* __HAL_DRIVER_AIC8800_I2C_H__ */
61
#endif
/* EOF */
vsf_i2c_cmd_t
vsf_i2c_cmd_t
Definition
i2c.h:32
VSF_I2C_CMD_10_BITS
@ VSF_I2C_CMD_10_BITS
Definition
i2c.h:40
VSF_I2C_CMD_7_BITS
@ VSF_I2C_CMD_7_BITS
Definition
i2c.h:39
VSF_I2C_CMD_NO_START
@ VSF_I2C_CMD_NO_START
Definition
i2c.h:47
VSF_I2C_CMD_STOP
@ VSF_I2C_CMD_STOP
Definition
i2c.h:48
VSF_I2C_CMD_NO_STOP_RESTART
@ VSF_I2C_CMD_NO_STOP_RESTART
Definition
i2c.h:49
__I2C_CMD_HW_MASK
@ __I2C_CMD_HW_MASK
Definition
i2c.h:42
VSF_I2C_CMD_RESTART
@ VSF_I2C_CMD_RESTART
Definition
i2c.h:37
VSF_I2C_CMD_WRITE
@ VSF_I2C_CMD_WRITE
Definition
i2c.h:33
VSF_I2C_CMD_READ
@ VSF_I2C_CMD_READ
Definition
i2c.h:34
VSF_I2C_CMD_START
@ VSF_I2C_CMD_START
Definition
i2c.h:36
vsf_hal_cfg.h
Generated by
1.9.8