📄 io.h
字号:
/* ************************************************************************ */
#define VCD_STB IOP00 /* Auto scan */
#define VCD_STBIN IOP00IN
#define MP3_reset IOP01 /* ST */
#define ENCODE_B IOP02IN /* LC72130 DATA INPUT */
#define ENCODE_A IOP03IN /* BEEP sound out */
#define VCD_SI IOP04IN /* POWER DET */
#define VCD_SO IOP05 /* TDA7313 SCL */
#define VCD_SCK IOP06IN /* LC72130 DATA OUTPUT */
#define RDS_SCK IOP07IN /* LC72130 DATA OUTPUT */
/*
P0DR = 0y11111111;
P0OUTCR = 0y00000000;
*/
#define MUTE_CTL IOP10 /* POWER IC standby control */
#define BEEP_OUT IOP11 /* MAIN mute control */
#define CDC_POWER_CTL IOP12 /* RADIO power control */
#define V_SW2 IOP13 /* VCD power control */
#define CD_STANDBY IOP14 /* AM/FM select */
//#define CD_STANDBY IOP35 /* AM/FM select */
#define REMOTE IOP15IN /* FAD = 1 with FAD function, FAD = 0 without */
#define OPEN_CTL IOP16
#define CLOSE_CTL IOP17
/*
P1DR = 0y00100001;
P1CR = 0y11011111;
*/
#define CDBUS IOP20IN
#define CDBUSOUT IOP20
#define BLUE_DET IOP30IN /* POWER IC standby control */
#define BLUE_INT IOP30IN // BLUE 中断,OC输出,低电平有效兼容3V和5V电平
#define DTHSW IOP31IN /* MAIN mute control */
#define PANEL_DET IOP32IN /* VCD power control */
#define POWER_DET IOP33IN /* RADIO power control */
#define Blue_SCL IOP50
#define Blue_SDA IOP51
#define Blue_SDAIN _p5prd_.bit.b1
#define SCLK IOP75
#define SDATA IOP76
#define LCD_DO IOP34 /* AM/FM select */
#define LCD_CLK IOP35 /* FAD = 1 with FAD function, FAD = 0 without */
#define LCD_CE IOP36
#define DTH_FLASH IOP37
/*
P3DR = 0y11111111;
*/
#define PLL_DO IOP40IN /* POWER IC standby control */
#define RDS_SDA IOP41IN /* MAIN mute control */
#define AF_MUTE IOP42 /* VCD power control */
#define RADIO_POWER_CTL IOP43 /* RADIO power control */
#define BACK_LIGHT_CTL IOP44 /* AM/FM select */
#define SYS_POWER_CTL IOP45 /* FAD = 1 with FAD function, FAD = 0 without */
#define MAIN_POWER_CTL IOP46
#define VCD_POWER_CTL IOP47
/*
P4DR = 0y00101011;
P4OUTCR = 0y11111100;
*/
#define SCL IOP50 /* POWER IC standby control */
#define SDA IOP51 /* MAIN mute control */
//#define SCL IOP12/* POWER IC standby control */
//#define SDA IOP12
#define OPEN_SW IOP52IN /* VCD power control */
#define CLOSE_SW IOP53IN /* RADIO power control */
#define LOAD_SW IOP54IN /* RADIO power control */
/*
P5DR = 0y11111111;
*/
/* ************************************************************************** */
#define KEY1 IOP67 /* BEEP sound out */
#define KEY0 IOP66 /* Load switch */
#define SMETER IOP65 /* ST */
#define V_SW1 IOP64 /* Hot in */
#define STEREO_INPUT IOP63 /* Option in */
#define USB_DET IOP62 /* Acc in */
#define AREA IOP61 /* Volume level */
#define LEVEL_IN IOP60 /* Tuner area code select */
#define LEVEL_A SDA
#define LEVEL_B PLL_CL
#define LEVEL_C PLL_DI
#define AuxIoInput {V_SW1 = 1;P6CR1 = 0x00;P6CR2 = 0x08;}
#define AuxIoOutput {V_SW1 = 1;P6CR1 = 0x10;P6CR2 = 0x18;}
/*
P6DR = 0y11101111;
P6CR1 = 0y00010000;
P6CR2 = 0y00011000;
*/
#define PLL_DI IOP77 /* BEEP sound out */
#define PLL_CL IOP76 /* Load switch */
#define PLL_CE IOP75 /* ST */
#define TVMODE_DET IOP74 /* Hot in */
#define EspId3_Det IOP73 /* Option in */
#define Double_Sel IOP72 /* Acc in */
#define Rds_Det IOP71 /* Volume level */
#define MECHANIC_DET IOP70 /* Tuner area code select */
/*
P7DR = 0y00011111;
P7CR1 = 0y11100000;
P7CR2 = 0y11100000;
*/
#define MP3Reset_Output { NOP();}
#define MP3Reset_Input { NOP();}
#define AREASEL 0x01
#define LEVELSEL 0x00
#define AuxSel 0x04
#define SDSEL 0x05
#define MECHANICSEL 0x08
#define RdsSel 0x09
#define DoubleSel 0x0a
#define EspSel 0x0b
#define TvSel 0x0c
#define UsbAdSel 0x02
#define OpenTray() { OPEN_CTL = 1;CLOSE_CTL = 0;}
#define CloseTray() { OPEN_CTL = 0;CLOSE_CTL = 1;}
#define StopTray() { OPEN_CTL = 0;CLOSE_CTL = 0;}
#define BreakTray() { OPEN_CTL = 1;CLOSE_CTL = 1;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -