On Tue, 2 Dec 2014, Britton Kerin wrote:

1.  Does _delay_us() need a double const, or is an int const guaranteed
   to work?    The avr libc manual just says "known const" in one place,
   but the signature     calls for a double.

_delay_us needs a double const.
It will get a double whether you give it a double or some other number.
That is what prototypes are for.
Prototypes are ordinary C.

   In file included from one_wire_slave.c:8:0:
   /home/bkerin/opt/avr/avr/include/util/delay.h: In function ‘ows_write_bit’:
   /home/bkerin/opt/avr/avr/include/util/delay.h:163:28: error:
__builtin_avr_delay_cycles expects a compile time integer constant
     __builtin_avr_delay_cycles(__ticks_dc);

My guess is that a variable or a non-constant
expression was passed to _delay_us.

--
Michael   [email protected]
"SCSI is NOT magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young
goat to your SCSI chain now and then."   --   John Woods
_______________________________________________
AVR-chat mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avr-chat

Reply via email to