Tonights newbe questions...

Still trying to get to grips with the USBFTDILoopback example from the USB Host 2.0 library.
Any suggestions on what the author (Oleg Mazurov) is intending with this snippet?

 rcode = Ftdi.RcvData(&rcvd, buf);
if (rcode && rcode != hrNAK)
   {
      ErrorMessage<uint8_t>(PSTR("Ret"), rcode);
    }

Why logicically AND the same variable? If the first variable (rcode) is TRUE, by definition the second variable (rcode) must also be TRUE?
Secondly, at the risk of embarrassing myself! What does the “<…>” mean in: “ErrorMessage<uint8_t>();”?

And yes, I have been Googling all day…

Regards, Martin

No response to your code, advice only. I/we don't have all the time in the world to sit on forums and answer questions. Most set aside an hour or two over a cup of coffee. In order to attract the attention of somebody who may or not be able/willing to assist you, the subject matter needs to be somewhat more descriptive than 'just another question'. It is sheer folly to think everyone will have a view out of curiosity.

if (rcode && rcode != hrNAK)  //if rcode is true (ie not zero) and rcode is not equal to the value of hrNAK

What does the “<…>” mean in: “ErrorMessage<uint8_t>();”?

No idea

Why logicically AND the same variable?

Read it like this

if ((rcode != 0)&& (rcode != hrNAK))

To “D”,

…Noted.

To the others, Thank you very much.

Regards, Martin