/
adv7533_reg.h
144 lines (119 loc) · 3.6 KB
/
adv7533_reg.h
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/**
******************************************************************************
* @file adv7533_reg.h
* @author MCD Application Team
* @brief This file contains all the constants parameters for the ADV7533
* which is the HDMI bridge between DSI and HDMI
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) 2016 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef ADV7533_REG_H
#define ADV7533_REG_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
/** @addtogroup BSP
* @{
*/
/** @addtogroup Components
* @{
*/
/** @addtogroup ADV7533
* @{
*/
/** @addtogroup ADV7533_Exported_Constants
* @{
*/
/**
* @brief ADV7533 Main Registers
*/
#define ADV7533_MAIN_SYNC_REG 0x17U
#define ADV7533_MAIN_POWER_DOWN_REG 0x41U
#define ADV7533_MAIN_HPG_REG 0x42U
/**
* @brief ADV7533 Main Features Parameters
*/
/**
* @brief ADV7533 CEC DSI Registers
*/
#define ADV7533_CEC_DSI_INTERNAL_TIMING_REG 0x27U
#define ADV7533_CEC_DSI_TOTAL_WIDTH_H_REG 0x28U
#define ADV7533_CEC_DSI_TOTAL_WIDTH_L_REG 0x29U
#define ADV7533_CEC_DSI_HSYNC_H_REG 0x2AU
#define ADV7533_CEC_DSI_HSYNC_L_REG 0x2BU
#define ADV7533_CEC_DSI_HFP_H_REG 0x2CU
#define ADV7533_CEC_DSI_HFP_L_REG 0x2DU
#define ADV7533_CEC_DSI_HBP_H_REG 0x2EU
#define ADV7533_CEC_DSI_HBP_L_REG 0x2FU
#define ADV7533_CEC_DSI_TOTAL_HEIGHT_H_REG 0x30U
#define ADV7533_CEC_DSI_TOTAL_HEIGHT_L_REG 0x31U
#define ADV7533_CEC_DSI_VSYNC_H_REG 0x32U
#define ADV7533_CEC_DSI_VSYNC_L_REG 0x33U
#define ADV7533_CEC_DSI_VFP_H_REG 0x34U
#define ADV7533_CEC_DSI_VFP_L_REG 0x35U
#define ADV7533_CEC_DSI_VBP_H_REG 0x36U
#define ADV7533_CEC_DSI_VBP_L_REG 0x37U
/** @Brief device ID register
*/
#define ADV7533_CHIPID_ADDR0 0x00U
#define ADV7533_CHIPID_ADDR1 0x01U
/**
* @}
*/
/* Exported macro ------------------------------------------------------------*/
/** @defgroup ADV7533_Exported_Macros ADV7533 Exported Macros
* @{
*/
/**
* @}
*/
/** @addtogroup ADV7533_Exported_Types
* @{
*/
typedef int32_t (*ADV7533_Write_Func)(void *, uint16_t, uint8_t*, uint16_t);
typedef int32_t (*ADV7533_Read_Func) (void *, uint16_t, uint8_t*, uint16_t);
typedef struct
{
ADV7533_Write_Func WriteReg;
ADV7533_Read_Func ReadReg;
void *handle;
} adv7533_ctx_t;
/**
* @}
*/
/* Exported functions --------------------------------------------------------*/
/** @addtogroup ADV7533_Exported_Functions
* @{
*/
int32_t adv7533_write_reg(adv7533_ctx_t *ctx, uint16_t reg, uint8_t *pdata, uint16_t length );
int32_t adv7533_read_reg(adv7533_ctx_t *ctx, uint16_t reg, uint8_t *pdata, uint16_t length );
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* ADV7533_REG_H */
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/