hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
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
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2022 Rockchip Electronics Co. Ltd.
 *
 * it66353 HDMI 3 in 1 out driver.
 *
 * Author: Kenneth.Hung@ite.com.tw
 *         Wangqiang Guo <kay.guo@rock-chips.com>
 * Version: IT66353_SAMPLE_1.08
 *
 */
#ifndef _PLATFORM_H_
#define _PLATFORM_H_
/*
 * #ifndef u8
 * typedef unsigned char u8 ;
 * #endif
 * #ifndef u16
 * typedef unsigned short u16;
 * #endif
 * #ifndef u32
 * typedef unsigned long u32;
 * #endif
 * #ifndef __tick
 * typedef unsigned long __tick;
 * #endif
 *
 * #ifndef __cplusplus
 * #ifndef bool
 * typedef unsigned char bool ;
 * #endif
 * #endif
 */
 
typedef unsigned long __tick;
#define CONST const
/*
 * #ifndef true
 * #define true 1
 * #endif
 *
 * #ifndef false
 * #define false 0
 * #endif
 */
/*
 * assign the print function
 *
 * #define pr_err    dev_err
 * #define pr_info   dev_info
 * #define pr_info2  dev_dbg
 */
 
// ---------- for CEC
 
#define iTE_FALSE    0
#define iTE_TRUE    1
 
#define WIN32
 
#ifdef _MCU_8051_
   typedef bit iTE_u1;
   #define _CODE code
   #define _CODE_3K code
 
#elif defined (WIN32)
   typedef int iTE_u1;
   #define _CODE const
   #define _CODE_3K const
/*
 * #elif defined (_MCU_IT6350_)
 * typedef unsigned char iTE_u1;
 * #define _CODE  __attribute__ ((section ("._OEM_BU1_RODATA ")))
 * #define _CODE_3K __attribute__ ((section ("._3K_RODATA ")))
 */
#elif defined (__WIN32__)
   typedef unsigned char iTE_u1;
   #define _CODE const
   #define _CODE_3K const
 
#else
   #error("Please define this section by your platform")
   typedef int iTE_u1;
   #define _CODE
   #define _CODE_3K
#endif // _MCU_8051_
 
/*
 * output TXOE state on JP47 (GPC5)
 * by nVidia's clock detect request
 */
#define REPORT_TXOE_0(x) {GPDRC &= ~0x20; } //GPC5=0;
#define REPORT_TXOE_1(x) {GPDRC |= 0x20; } //GPC5=1;
 
/*
 * typedef char iTE_s8, *iTE_ps8;
 * typedef unsigned char iTE_u8, *iTE_pu8;
 * typedef short iTE_s16, *iTE_ps16;
 * typedef unsigned short iTE_u16, *iTE_pu16;
 */
 
#endif