PCF8951读程序

2019-04-15 12:25发布

unsigned char AD_Read() { unsigned char tmp; iic_start(); iic_send_byte(0x90); if(0 == ack) { return ERR; } iic_send_byte(0x40); if(0 == ack) { return ERR; } iic_start(); iic_send_byte(0x91); if(0 == ack) { return ERR; } tmp = iic_rev_byte(); iic_noack(); iic_stop(); return tmp; }

热门文章