summaryrefslogtreecommitdiff
path: root/bsp/essemi/es32f365x/drivers/ES/es_conf_info_i2c.h
blob: 8a488bfe608171ffad05c9ba53faa35c60d4ca39 (plain)
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
95
/*
 *  Change Logs:
 *  Date            Author          Notes
 *  2021-04-20      liuhy          the first version
 *
 * Copyright (C) 2021 Shanghai Eastsoft Microelectronics Co., Ltd. All rights reserved.
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the License); you may
 * not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

#ifndef __ES_CONF_INFO_I2C_H__
#define __ES_CONF_INFO_I2C_H__

#include "es_conf_info_map.h"
#include <ald_i2c.h>
#include <ald_gpio.h>
#include <rtdbg.h>

#define ES_C_I2C_STRETCH                 I2C_NOSTRETCH_DISABLE
#define ES_C_I2C_NO_STRETCH              I2C_NOSTRETCH_ENABLE

#define ES_C_I2C_GENERALCALL             I2C_GENERALCALL_ENABLE
#define ES_C_I2C_NO_GENERALCALL          I2C_GENERALCALL_DISABLE


#define ES_C_I2C_ADDR_7_MODE                I2C_ADDR_7BIT
#define ES_C_I2C_ADDR_10_MODE                I2C_ADDR_10BIT


/* I2C 配置 */



/* codes_main */





#ifndef  ES_DEVICE_NAME_I2C0
#define  ES_DEVICE_NAME_I2C0     "i2c0"
#endif

#ifndef  ES_DEVICE_NAME_I2C1
#define  ES_DEVICE_NAME_I2C1     "i2c1"
#endif

#ifndef  ES_I2C0_CLK_SPEED
#define ES_I2C0_CLK_SPEED                100000
#endif
#ifndef  ES_I2C0_OWN_ADDR1
#define ES_I2C0_OWN_ADDR1                0x20
#endif
#ifndef  ES_I2C0_GENERAL_CALL
#define ES_I2C0_GENERAL_CALL             ES_C_I2C_NO_GENERALCALL
#endif
#ifndef  ES_I2C0_STRETCH
#define ES_I2C0_STRETCH               ES_C_I2C_STRETCH
#endif
#ifndef ES_I2C0_ADDR_MODE
#define ES_I2C0_ADDR_MODE                ES_C_I2C_ADDR_7_MODE
#endif

#ifndef  ES_I2C1_CLK_SPEED
#define ES_I2C1_CLK_SPEED                100000
#endif
#ifndef  ES_I2C1_OWN_ADDR1
#define ES_I2C1_OWN_ADDR1                0x20
#endif
#ifndef  ES_I2C1_GENERAL_CALL
#define ES_I2C1_GENERAL_CALL             ES_C_I2C_NO_GENERALCALL
#endif
#ifndef  ES_I2C1_STRETCH
#define ES_I2C1_STRETCH               ES_C_I2C_STRETCH
#endif
#ifndef ES_I2C1_ADDR_MODE
#define ES_I2C1_ADDR_MODE                ES_C_I2C_ADDR_7_MODE
#endif



#endif