#ifndef I2C_H
#define I2C_H
#define sda (P1.1)
#define scl (P1.0)
void i2c_delay(unsigned char i);
void i2c_start(void);
void i2c_stop(void);
void i2c_sendbyte(unsigned char byt);
unsigned char i2c_waitack(void);
unsigned char i2c_receivebyte(void);
void i2c_sendack(unsigned char ackbit);
void write_eeprom(unsigned char add,unsigned char val);
unsigned char read_eeprom(unsigned char add);
void init_pcf8591(void);
unsigned char adc_pcf8591(void);
#endif
2020-01-08 03:07:27
100KB
瑞萨
1