Hi,
I'm finally returning to this topic, and have some trouble.
This example, given by Vasi, has this construct:
function ow_bit_io(byte in out b) return byte is
return ow_bit_io_intern( b & 1, 0)
end function
corresponding called function is defined as:
function ow_bit_io_intern(byte in out b, bit in with_parasite_enable)
return byte is
but my compiler, jalv24q3, complains about that function call:
rosso_ow.jal:111: ')' expected (got '&')
rosso_ow.jal:111: Too few parameters (2 expected, 1 found)
rosso_ow.jal:111: 'end' expected (got ',')
rosso_ow.jal:111: {function starts at rosso_ow.jal:109}
rosso_ow.jal:111: unexpected token: ","
5 errors, 0 warnings
Looks like "b & 1" does not look like a good option for a byte
variable to compiler.
If I enclose it in parentheses, compiler gives this:
return ow_bit_io_intern(b & 1, 0)
rosso_ow.jal:111: ')' expected (got '&')
rosso_ow.jal:111: Too few parameters (2 expected, 1 found)
rosso_ow.jal:111: 'end' expected (got ',')
rosso_ow.jal:111: {function starts at rosso_ow.jal:109}
rosso_ow.jal:111: unexpected token: ","
5 errors, 0 warnings
I am not sure that bit masking is really required there, but why is is
complaining about this?
On Thu, Nov 27, 2014 at 2:25 AM, vasi vasi <[email protected]> wrote:
> I was working on a port of a 1wire library with search function, but not
> tested it yet. If you want to play with, here it is.
>
> In the comment at the beginning of the file you have the web address of the
> AVR library
>
> On Wed, Nov 26, 2014 at 3:36 PM, KPL <[email protected]> wrote:
>>
>> Hi,
>>
>> I have used ds18b20 library from jallib many times, but now I would
>> like to read multiple sensors, connected to the same bus. The only
>> example I see in trunk is tst_ds18b20_multi_serial.jal, which just
>> reads predefined sensors, by their ID's - but can not detect sensors
>> and their ID's by itself.
>>
>> The only mentioning of search algorithm done in JAL i see here:
>> http://mientki.ruhosting.nl/data_www/pic/libs_hw/dallas_1_wire.html
>> but link to include file delay_20mc.jal returns 404, and procedure
>> itself seems complicated, together with bank_arrays.
>> Are there any other attempts at this?
>>
>> I am reading AN187, but... somehow... probably need more sleep or
>> something.
>>
>> The general idea is to build a device with currently "hot" ESP8266
>> module, which would periodically check sensors connected to it, and
>> send sensor id's together with corresponding temperatures to a web
>> server.
>>
>> --
>> KPL
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "jallib" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/jallib.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> Vasi
>
> --
> You received this message because you are subscribed to the Google Groups
> "jallib" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/jallib.
> For more options, visit https://groups.google.com/d/optout.
--
Kārlis
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jallib.
For more options, visit https://groups.google.com/d/optout.