这个函数应该实现了部分功能了,4*4键盘应该只有16个按键,A~F之间应该要复用你说的清零之类功能吧。你得具体说说清零、确认和删除具体要做哪些操作。
void key_over_write()
{
switch(key)
{
case 0:write_data(0x30+1);break;
case 1:write_data(0x30+2);break;
case 2:write_data(0x30+3);break;
case 3:write_data('A');break;
case 4:write_data(0x30+6);break;
case 5:write_data(0x30+5);break;
case 6:write_data(0x30+4);break;
case 7:write_data('B');break;
case 8:write_data(0x30+7);break;
case 9:write_data(0x30+8);break;
case 10:write_data(0x30+9);break;
case 11:write_data('C');break;
case 12:write_data('*');break;
case 13:write_data(0x30+0);break;
case 14:write_data('#');break;
case 15:write_data('D');break;
}
}