24c64子程序的入口参数是什么?

来源:百度知道 编辑:UC知道 时间:2024/05/22 13:18:30
这个是从网上找来的,但是不知道应该传什么进去啊……
void AT24C64_W(void *mcu_address,uint AT24C64_address,uint count)
{
while(count--)
{
I2C_Start();
/*I2C_Send_Byte( 0xa0 + AT24C64_address /256 *2);*/ /* 24C16 USE */
I2C_Send_Byte( 0xa0 );
I2C_Send_Byte( AT24C64_address/256 );
I2C_Send_Byte( AT24C64_address %256 );
I2C_Send_Byte( *(uchar*)mcu_address );
I2C_Stop();
Delay_N_mS(10); /* waiting for write cycle to be completed */
((uchar*)mcu_address)++;
AT24C64_address++;
}
}
void AT24C64_R(void *mcu_address,uint AT24C64_address,uint count)
{
while(count--)
{
I2C_St

mcu_address是指你要传送的数据在单片机中的存放地址,比如一个数组,它就是指这个数组的首地址;at24c64_add是指你传送过来的数据在EEPROM中的存放地址,可以是0x0000~0x0fff中的任意地址;count就是指你传送过去的数据个数。