//?????
char s_softreset(void)
// resets the sensor by a softreset
{
unsigned char error=0;
s_connectionreset(); //??????
error+=s_write_byte(RESET); //??????
return error; //error=1 ????
}
/*??????
char s_read_statusreg(unsigned char *p_value, unsigned char *p_checksum)
//----------------------------------------------------------------------------------
// reads the status register with checksum (8-bit)
{
unsigned char error=0;
s_transstart(); //transmission start
error=s_write_byte(STATUS_REG_R); //send command to sensor
*p_value=s_read_byte(ACK); //read status register (8-bit)
*p_checksum=s_read_byte(noACK); //read checksum (8-bit)
return error; //error=1 in case of no response form the sensor
}
//??????
char s_write_statusreg(unsigned char *p_value)
// writes the status register with checksum (8-bit)
{
unsigned char error=0;
s_transstart(); //transmission start
error+=s_write_byte(STATUS_REG_W);//send command to sensor
error+=s_write_byte(*p_value); //send value of status register
return error; //error>=1 in case of no response form the sensor
} */
作者: man1234567 時(shí)間: 2020-6-8 19:08
INTRINS.H 文件頭少了東東所以注釋部分變成程序,應(yīng)該是
/*
Intrinsic functions for C51.
Copyright (c) 1988-2010 Keil Elektronik GmbH and ARM Germany GmbH
All rights reserved.
--------------------------------------------------------------------------*/作者: 苯甲醇 時(shí)間: 2020-6-9 10:36
Intrinsic functions for C51.
Copyright (c) 1988-2010 Keil Elektronik GmbH and ARM Germany GmbH
All rights reserved.
--------------------------------------------------------------------------*/
換成這個(gè)就好了
謝謝您的答復(fù)