Rev 1767 Rev 1774
Line 1... Line -...
1 #define ONE_WIRE_PIN PIN_A1 -  
2   1  
3 void onewire_reset() 2 void onewire_reset()
4   -  
5   -  
6   -  
7 { 3 {
8 output_low(ONE_WIRE_PIN); 4 output_low(ONE_WIRE_PIN);
9 delay_us(500); 5 delay_us(500);
10 output_float(ONE_WIRE_PIN); 6 output_float(ONE_WIRE_PIN);
11 delay_us(500); 7 delay_us(500);
Line 41... Line 37...
41 output_float(ONE_WIRE_PIN); 37 output_float(ONE_WIRE_PIN);
42 delay_us( 8 ); 38 delay_us( 8 );
43 shift_right(&data,1,input(ONE_WIRE_PIN)); 39 shift_right(&data,1,input(ONE_WIRE_PIN));
44 delay_us( 120 ); 40 delay_us( 120 );
45 } 41 }
46   -  
47 return( data ); 42 return( data );
48 } 43 }