芯片工作正常,能夠控制輸出。
設(shè)置為中斷輸入,中斷能夠正常觸發(fā),但是無論如何讀到的輸入都是零,以下是配置:
ch423_wiret_byte(CH423_SYS_CMD|BIT_X_INT);
?ch423_wiret_byte(CH423_SET_IO_CMD|0xff);
中斷處理:
void ch423_inter(void)?
{
?if (EXTI_GetITStatus(EXTI_Line15)) {
????u8 io = ch423_read_byte();
????sys_info.io_status = io;
EXTI_ClearFlag(EXTI_Line15);
}
}