예제 #1
0
파일: eui64.c 프로젝트: giu7ppe/openwsn
uint8_t ow_reset() {              // >= 960us 
   int present;
   owpin_output_low();
   delay_us(OW_DLY_H);            // t_RSTL
   owpin_prepare_read();
   delay_us(OW_DLY_I);            // t_MSP
   present = owpin_read();
   delay_us(OW_DLY_J);            // t_REC
   return (present==0);
}
예제 #2
0
파일: eui64.c 프로젝트: Babody/openwsn-fw
uint8_t ow_read_bit() {           // >= 70us
   int bit;
   owpin_output_low();
   delay_us(OW_DLY_A);            // t_RL
   owpin_prepare_read();
   delay_us(OW_DLY_E);            // near-max t_MSR
   bit = owpin_read();
   delay_us(OW_DLY_F);            // t_REC
   return bit;
}