what is the point of available() if read() returns 1 if a message is found? if there are no messages then it will return 0.
now think about this, we could check the IFLAG registers for message flags, but that includes transmits, which means we have to for-loop the non-interrupt message boxes and check for receive only boxes with messages.
Now, we have to do this again for the read() function as well. Do you want to do double redundant checks?
that available() i think is for the queue, but why would you check a queue if you are trying to read a mailbox?
now think about this, we could check the IFLAG registers for message flags, but that includes transmits, which means we have to for-loop the non-interrupt message boxes and check for receive only boxes with messages.
Now, we have to do this again for the read() function as well. Do you want to do double redundant checks?
that available() i think is for the queue, but why would you check a queue if you are trying to read a mailbox?