Dear AngelC,
I am using the BeeStack codebase for the application. I am using the GPIO PTD1 for DS18B20 DQ pin,and I want to know whether it is avaliable or ocupied on the TWR-KW24D512v board.But the results I got were always + 0.0 .I think it maybe something about the CLK in the CPIO confignation. I write it like this:
#define CL_DQ (gSENSORPortDataClearReg_c |= gSENSORPin_c) // PTD1=0
#define SET_DQ (gSENSORPortDataSetReg_c |= gSENSORPin_c) // PTD1=1
#define SET_OUT GPIOD_PDDR|=0x00000002 //PTD1 for output
#define SET_IN GPIOD_PDDR&=~0x00000002 //PTD1 for intput
#define IN_DQ ((mSENSOR_PORT_c & mSENSOR_MASK_c)>>gSENSOR_PIN_c) //get data for PTD1 pin!!!
In addition,how long will the following function delay for in the stack?
void Delay_nus(uint16_t s)
{
while (s--)
{
asm("NOP");
asm("NOP");
asm("NOP");
}
}
Thanks a lot,
Shelley