ipod.h
2.36 KB
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
145
146
147
148
149
#ifndef __IPOD_H__
#define __IPOD_H__
#define IPOD_MEM_SIZE_DOWN
#define IPOD_WAIT_TIME_OUT (3000 / OS_MSEC_PER_TICK + 1) //3s
//config ipod feature
//dock port only, disable usb port ipod function
//#define IPOD_DISABLE_USB_PORT
//#define IPOD_USB_AUDIO_CHARGE_ONLY
//FIXME: debug
#define ENABLE_DAUDIO
//#define ANALOG_LINE_OUT
//#define IPOD_VIDEO_OUT
//#define IPOD_LINE_IN
//#define IPOD_NO_CHARGE
//#define IPOD_ACC_POWER_WAIT
//#define APPS_SUPPORT
//#define IPOD_VOLUME_SET
//#define IPOD_VOLUME_SYNC
//#define IPOD_VOL_NO_LINE_OUT
//#define IAP_TIME_OUT
#ifdef APPS_SUPPORT
//#undef ENABLE_DAUDIO
#undef IPOD_VIDEO_OUT
#undef IPOD_LINE_IN
//#define APPS_BEAUTIFUL
#define APPS_OPTEK
//#define APPS_HARBOUR_LIGHT
//#define APPS_STRING_BEAUTIFUL
#define APPS_STRING_PHILIPS
//#define APPS_STRING_HARBOUR_LIGHT
//#define APPS_AUTO_LAUNCH
//#define APPS_UPGRADE_ENABLE
#endif
//#define JP_SR80I
typedef enum {
enIPOD_CONNECT,
enIPOD_DISCONNECT,
enIPOD_IPHONE_SEND_PKT
} enum_IPOD_MSG;
typedef struct {
int msg;
U32 param1;
U32 param2;
} IPOD_MSG;
typedef struct {
U8 major;
U8 minor;
U8 revision;
} IPOD_SOFT_VER;
typedef struct {
U8 support;
U8 lingo;
U8 major;
U8 minor;
} LINGO_VER;
#define MAX_LINGO_VER 16
#define MAX_IPOD_MODEL_NUM 64
#define MAX_IPOD_NAME 64
#define MAX_IPOD_SERIAL_NUM 64
#define LINGO_OPTION_SIZE 8
typedef struct {
int type;
int initOK;
int trkInfoGot;
U8 appsAutoLaunch;
#ifdef APPS_SUPPORT
//communication with apps
U8 appsComm;
#endif
IPOD_SOFT_VER vSoft;
U16 name[MAX_IPOD_NAME];
U16 serialnum[MAX_IPOD_SERIAL_NUM];
U32 modelid;
U16 modelNum[MAX_IPOD_MODEL_NUM];
int modelOk;
LINGO_VER vlingo[MAX_LINGO_VER];
int vlingOk;
U8 maxPlayLoadSupport;
U16 maxPayloadSize;
LINGO_VER vlingoDaudio;
U8 lgen_option[LINGO_OPTION_SIZE];
U8 lsrmt_option[LINGO_OPTION_SIZE];
U8 ldsp_option[LINGO_OPTION_SIZE];
U8 lda_option[LINGO_OPTION_SIZE];
int idps;
int rxInit;
} IPOD_DEV_INFO;
typedef enum {
enIPOD_IPHONE,
enIPOD_IPAD,
enIPOD_OTHERS
} enum_IPOD_MODEL;
int ipod_getModelTypes( void );
U32 endianConvertU32 ( U32 b );
U16 endianConvertU16 ( U16 b );
U32 byteToU32b( U8 *ptr );
U8 *U32ToPtrb( U32 d, U8 *ptr );
U16 byteToU16b( U8 *ptr );
int ipod_audioRxCtl( int ena );
int ipod_isAutoLaunchSupport( void );
U8 ipodDigital_converted_to_ipodUart(void);
U32 ipod_getDevid( void );
#endif //__IPOD_H__