在TI的官方库中ctsStatusReg 这个寄存器的DOI位是这样定义的:DOI Bit 1 Direction of interest:
0: Increasing capacitance //这个位为0表示感兴趣的方向是电容增加
1: Decreasing capacitance //这个位为1表示感兴趣的方向是电容减小
但是库中有这么一个函数,感到纳闷:
void TI_CAPT_Update_Tracking_DOI(uint8_t direction)
{
if(direction)
{
ctsStatusReg |= DOI_INC; //direction of interest is an increase in capacitance.
}
else
{
ctsStatusReg &= ~DOI_INC; //direction of interest is a decrease in capacitance.
}
}
Inputs: The direction of interest.
Outputs: None.
Function: If the input is true (non-zero), then the direction of interest is an increase in capacitance. If the
input is 0x00, then the direction of interest is a decrease in capacitance.
这两者岂不是矛盾了,坐等大侠指点迷津
|