I was thinking about this for a couple of days, please look at it as a request to discuss possible codes for this request. Is there a bullet proof way to enable a project using, for example RC5 or SIRC, let's mainly say SIRC, and be able to distinguish between long and short press? I saw the button debouncing code by perter danninger, and he did quite nice job there. Is there a way to apply this for IR remote control, such that there is the possibility to detect short, long presses as he has done for switches.
In TV sets, we can turn on/off the TV using the same button, how is this correctly handled in code?
this would be real nice way to handle tons of IR streaming code while pressing the button on the remote control set.
The problem with RC5 toggle bit is that it is not reliable. Suppose I press, then press again with my hand on the TX, then press again, the MCU has saved the first toggle bit, missed the second, and then when it sees the third toggle bit, it will see it unchanged.