72 lines
978 B
C
72 lines
978 B
C
|
|
#ifndef _ADV7180_H_
|
|
#define _ADV7180_H_
|
|
|
|
//#include "../bits.h"
|
|
|
|
////#define RESET_DELAY (5*HZ/10) // 5ms
|
|
#define RESET_DELAY (10*HZ/10) // 5ms
|
|
|
|
#define I2C_ADV7180 0x42
|
|
|
|
#define I2C_NAME(s) (s)->name
|
|
|
|
static char adv7180_name[] = "adv7180";
|
|
|
|
enum input_mode {
|
|
CVBS, // Composite
|
|
SVIDEO, // S-video
|
|
YPbPr, // Component
|
|
};
|
|
|
|
struct adv7180 {
|
|
unsigned char reg[128];
|
|
|
|
int norm;
|
|
enum input_mode input;
|
|
int enable;
|
|
};
|
|
|
|
static const unsigned char init_composite[] = {
|
|
0x00, 0x04,
|
|
0x04, 0xD7,
|
|
0x17, 0x41,
|
|
0x31, 0x02,
|
|
0x37, 0x09, ////
|
|
0x3D, 0xA2,
|
|
|
|
0x3E, 0x6A,
|
|
0x3F, 0xA0,
|
|
0x0E, 0x80,
|
|
0x55, 0x81,
|
|
0x0E, 0x00,
|
|
};
|
|
|
|
static const unsigned char init_component[] = {
|
|
0x00, 0x09,
|
|
0x31, 0x02,
|
|
0x3D, 0xA2,
|
|
0x3E, 0x6A,
|
|
0x3F, 0xA0,
|
|
|
|
0x0E, 0x80,
|
|
0x55, 0x81,
|
|
0x0E, 0x00,
|
|
};
|
|
|
|
static const unsigned char init_svideo[] = {
|
|
0x00, 0x06,
|
|
0x04, 0x57,
|
|
0x31, 0x02,
|
|
0x3D, 0xA2,
|
|
0x3E, 0x6A,
|
|
|
|
0x3F, 0xA0,
|
|
0x58, 0x04,
|
|
0x0E, 0x80,
|
|
0x55, 0x81,
|
|
0x0E, 0x00,
|
|
};
|
|
#endif
|
|
|