//----------------------------------------------------------------------------- // Write a block 1-Wire data bytes and return the sampled result in the same // buffer. // void OWBlock(unsigned char *data, int data_len) { int loop; for (loop = 0; loop < data_len; loop++) { data[loop] = OWTouchByte(data[loop]); } }
//-------------------------------------------------------------------------- // Send 8 bits of read communication to the 1-Wire Net and and return the // result 8 bits read from the 1-Wire Net. // // Returns: 8 bits read from 1-Wire Net // unsigned char DallasOneWire::OWReadByte(void) { return OWTouchByte(0xFF); }
//-------------------------------------------------------------------------- // Send 8 bits of communication to the 1-Wire Net and verify that the // 8 bits read from the 1-Wire Net is the same (write operation). // The parameter 'sendbyte' least significant 8 bits are used. // // 'sendbyte' - 8 bits to send (least significant byte) // // Returns: TRUE: bytes written and echo was the same // FALSE: echo was not the same // void DallasOneWire::OWWriteByte(unsigned char sendbyte) { OWTouchByte(sendbyte); }