呵呵,楼上这原型不错,尤其是用了Const关键字,返回结果最好做成Bool型,也可做成整形,返回成功时为0,返回错误时,直接返回非0的错误码.
bool E2Read( uint16_t E2addr, void * RamAddr, uint8_t count );
bool E2Write( uint16_t E2addr, const void * RamAddr, uint8_t count );
uint16 E2Read( uint16_t E2addr, void * RamAddr, uint8_t count );
uint16 E2Write( uint16_t E2addr, const void * RamAddr, uint8_t count ); |