Changes between Initial Version and Version 1 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/KeypadSound/KeyPadSetUSBEvent


Ignore:
Timestamp:
04/09/18 13:54:24 (7 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/ApplicationLibraries/lib825ev/KeypadSound/KeyPadSetUSBEvent

    v1 v1  
     1= KeyPadSetUSBEvent =
     2Set an event (callback) function to be called when character is received via USB keyboard.
     3
     4{{{
     5void KeyPadSetUSBEvent(uint8 (*pUSBKeypadEvent)(uint 8 keyRcvd))
     6}}}
     7
     8== Parameters ==
     9
     10 uint8 (*pUSBKeypadEvent)(uint8 keyRcvd))
     11
     12== Return Value ==
     13
     14 * void - does not return any value
     15
     16== Remarks ==
     17
     18Applications must call OpenBeeper before the keypad or beeper devices may be used from the application. This function is useful if it is desired to disregard or modify certain characters received from an attached USB keyboard.
     19
     20== Examples ==
     21
     22{{{
     23uint8 USBKeyRcvd(uint8 key)
     24{
     25   if(key >= 'a' && key <= 'z') // lower case key pressed
     26   {
     27       return key - 'a' + 'A';  // convert to upper case
     28   }
     29   else
     30   {
     31       return key;
     32   }
     33}
     34
     35void IndStartup(void)
     36{
     37    KeyPadSetUSBEvent(USBKeyRcvd);
     38    // ...
     39
     40}
     41
     42}}}
     43
     44
     45== See Also ==
     46
     47 * [http://tech.825spectrum.com/trac/wiki/Docs/Prog/Manual/ApplicationLibraries/lib825ev/KeypadSound/OpenBeeper OpenBeeper]