Hi all,
for my project I need three one-wire micro LANs.
Trouble is, I can't figure out how to pass the pin name as an argument to my functions.
This is the reset function for a single run of DS18B20 which works ok:
unsigned char ow_reset() {
unsigned char presence;
DQ.output();
DQ = 0;
wait_us(480); // leave DQ low for 480 us
DQ.input(); // allow line to return high
wait_us(70); // wait for presence
presence = DQ; // get presence signal
wait_us(410); // wait for end of timeslot
return(presence); // presence signal returned, 0=presence, 1 = no part detected
}
What I want is to pass the pin name to ow_reset, but my poor C skills won't let me.
I've tried some variations found on this forum, including the examples in the 'Writing a library' thread without luck.
Any help on this is greatly appreciated.
Hi all,
for my project I need three one-wire micro LANs. Trouble is, I can't figure out how to pass the pin name as an argument to my functions.
This is the reset function for a single run of DS18B20 which works ok:
What I want is to pass the pin name to ow_reset, but my poor C skills won't let me. I've tried some variations found on this forum, including the examples in the 'Writing a library' thread without luck.
Any help on this is greatly appreciated.