On Sunday 16 March 2014 14:14:58 Antti Seppälä wrote: > Hi James. > > On 16 March 2014 13:50, James Hogan <james@xxxxxxxxxxxxx> wrote: > > Hi Antti, > > > > On Sunday 16 March 2014 10:34:31 Antti Seppälä wrote: > >> > + > >> > + /* all important bits of scancode should be set in mask */ > >> > + if (~scancode->mask & 0x2fff) > >> > >> Do we want to be so restrictive here? In my opinion it's quite nice to > >> be able to encode also the toggle bit if needed. Therefore a check > >> against 0x3fff would be a better choice. > >> > >> I think the ability to encode toggle bit might also be nice to have > >> for rc-5(x) also. > > > > I don't believe the toggle bit is encoded in the scancode though, so I'm > > not sure it makes sense to treat it like that. I'm not an expert on RC-5 > > like protocols or the use of the toggle bit though. > > Well I'm not an expert either but at least streamzap tends to have the > toggle bit enabled quite often when sending ir pulses. > > When decoding the toggle is always removed from the scancode but when > encoding it would be useful to have the possibility to encode it in. > This is because setting the toggle bit into wakeup makes it easier to > wake the system with nuvoton hw as it is difficult to press the remote > key short time enough (less than around 112ms) to generate a pulse > without the toggle bit set. Fair enough. So changing the minimum rc5-sz masks to 0x3fff sounds reasonable to allow toggle to be controlled. Just to clarify though, so you mean that the remote uses toggle=1 first (and in repeat codes) unless you press it a second time (new keypress) within a short amount of time? I.e. like this? Press message toggle=1 repeat toggle=1 repeat toggle=1 unpress Press message toggle=!last_toggle only if within X ms, 1 otherwise Sounds like for RC-5/RC-5X toggle should probably be taken from 0x00002000, 0x00200000 of scancode respectively (just above "system" in both cases). Cheers James
Attachment:
signature.asc
Description: This is a digitally signed message part.