#include "H/Function_Init.H" /***************************************************** *函数名称:void IO_Init(void) *函数功能:IO初始化,CLK输出,DT输入 *入口参数:void *出口参数:void *****************************************************/ void IO_Init(void) { P0CON = 0x12; ////7 , 6 DT1, 5 , 4 .CLK1, 3 , 2 DT3, 1 .CLK3, 0 P0PH = 0x00; P1CON = 0xFF; //7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 P1PH = 0x00; P2CON = 0x20; //7 大按钮 , 6 DT2, 5 .CLK2, 4 小按钮, 3 , 2 , 1 , 0 P2PH = 0x90; P3CON = 0xFF; //7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 P3PH = 0x00; P4CON = 0x08; //7 , 6 , 5 , 4 DT0, 3 .CLK0, 2 , 1 , 0 P4PH = 0x00; P5CON = 0xFF; //7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 P5PH = 0x00; SC95F7616B_NIO_Init(); //未引出IO口配置 } void Delay(unsigned long time) { while(time--);//4.3us } void Delay1ms(void) { Delay(585); } void Delay_ms(unsigned long time) { while(time--) Delay1ms(); }