哦,这是我的做法,不知为何不能实现?
void set_Resistive_pull_down(void)
{
//this address range in Bank 0
CPU_F_Temp=CPU_F;
M8C_SetBank0;
PRT0DM0|=1<<7;
PRT0DM1&=~(1<<7);
//this address range in Bank 1
M8C_SetBank1;
PRT0DM2&=~(1<<7);
CPU_F=CPU_F_Temp;
PRT0DR&=~(1<<7);
}
void set_High_impedance_analog(void)
{
//this address range in Bank 0
CPU_F_Temp=CPU_F;
M8C_SetBank0;
PRT0DM0&=~(1<<7);
PRT0DM1|=1<<7;
//this address range in Bank 1
M8C_SetBank1;
PRT0DM2|=1<<7;
CPU_F=CPU_F_Temp;
}