Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
bitWrite macro definition error
26-11-2013, 08:04 AM,
#1
bitWrite macro definition error
in x.4/p8/pinguino/core/macro.h:

#define BitWrite(value, bit, bitvalue) \
(bitvalue ? bitSet(value, bit) : bitClear(value, bit))
Should be:
#define BitWrite(value, bit, bitvalue) \
(bitvalue ? BitSet(value, bit) : BitClear(value, bit))

(notice Bit*** vs bit***)


It actually should be
#define bitWrite(value, bit, bitvalue) \
(bitvalue ? bitSet(value, bit) : bitClear(value, bit))

and all defined macros in the file should start with a lower case, to match arduino macros, but I'm not sure if there are any conflicts with existing code.
Reply
26-11-2013, 08:46 PM,
#2
RE: bitWrite macro definition error
I fixed macro.h (where Pinguino's Bit*** functions are) and pinguino.pdl (where Arduino's bit*** functions are). I will publish it tomorrow.
Thank you for this report.


(26-11-2013, 08:04 AM)dc_740 Wrote: in x.4/p8/pinguino/core/macro.h:

#define BitWrite(value, bit, bitvalue) \
(bitvalue ? bitSet(value, bit) : bitClear(value, bit))
Should be:
#define BitWrite(value, bit, bitvalue) \
(bitvalue ? BitSet(value, bit) : BitClear(value, bit))

(notice Bit*** vs bit***)


It actually should be
#define bitWrite(value, bit, bitvalue) \
(bitvalue ? bitSet(value, bit) : bitClear(value, bit))

and all defined macros in the file should start with a lower case, to match arduino macros, but I'm not sure if there are any conflicts with existing code.
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)