Decode SONY IR remote signals.  
More...
#include "simpletools.h"
Go to the source code of this file.
Macros | 
| 
#define  | ENTER   11 | 
|   | ENTER constant value 11 corresponds to ENTER key. 
  | 
| 
#define  | CH_UP   16 | 
|   | CH_UP constant value 16 corresponds to channel up key. 
  | 
| 
#define  | CH_DN   17 | 
|   | CH_DN constant value 17 corresponds to channel down key. 
  | 
| 
#define  | VOL_UP   18 | 
|   | VOL_UP constant value 18 corresponds to volume up key. 
  | 
| 
#define  | VOL_DN   19 | 
|   | VOL_DN constant value 19 corresponds to volume down key. 
  | 
| 
#define  | MUTE   20 | 
|   | MUTE constant value 20 corresponds to mute key. 
  | 
| 
#define  | PWR   21 | 
|   | PWR constant value 21 corresponds to power key. 
  | 
| 
#define  | PREV_CH   59 | 
|   | PREV_CH constant value 59 corresponds to previous channel key. 
  | 
| 
#define  | ARROW_UP   53 | 
|   | ARROW_UP constant value 53 corresponds to the upward pointing arrow key. 
  | 
| 
#define  | ARROW_DN   54 | 
|   | ARROW_DN constant value 54 corresponds to the downward pointing arrow key. 
  | 
| 
#define  | ARROW_L   52 | 
|   | ARROW_L constant value 52 corresponds to the left pointing arrow key. 
  | 
| 
#define  | ARROW_R   51 | 
|   | ARROW_R constant value 51 corresponds to the right pointing arrow key. 
  | 
Functions | 
| void  | sirc_setTimeout (int ms) | 
|   | Set the time limit to wait for a SONY IR remote packet.  
  | 
| int  | sirc_button (int pin) | 
|   | Report the SONY IR remote button pressed. Removes device identifying information from the packet and just returns the value of the button.  
  | 
| int  | sirc_device (int pin) | 
|   | Report the SONY device the IR remote is sending codes to. Device examples include TV (1), VCR 1 (2), and projector (20).  
  | 
| int  | sirc_code (int pin, int bits) | 
|   | Return the entire IR packet value. Does not strip .  
  | 
Detailed Description
Decode SONY IR remote signals. 
- Author
 - Andy Lindsay
 
- Version
 - 0.86
 
- Copyright
 - Copyright (C) Parallax, Inc. 2013. All Rights MIT Licensed.
 
: Source document: http://www.sbprojects.com/knowledge/ir/sirc.php 
Function Documentation
      
        
          | int sirc_button  | 
          ( | 
          int  | 
          pin | ) | 
           | 
        
      
 
Report the SONY IR remote button pressed. Removes device identifying information from the packet and just returns the value of the button. 
- Parameters
 - 
  
    | pin | Number of the I/O pin connected to IR receiver. | 
  
   
- Returns
 - key value. 
 
 
 
      
        
          | int sirc_code  | 
          ( | 
          int  | 
          pin,  | 
        
        
           | 
           | 
          int  | 
          bits  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Return the entire IR packet value. Does not strip . 
- Parameters
 - 
  
    | pin | Number of the I/O pin connected to IR receiver. | 
    | bits | Number of bits to retrieve (up to 12). | 
  
   
- Returns
 - IR message packet value. 
 
 
 
      
        
          | int sirc_device  | 
          ( | 
          int  | 
          pin | ) | 
           | 
        
      
 
Report the SONY device the IR remote is sending codes to. Device examples include TV (1), VCR 1 (2), and projector (20). 
- Parameters
 - 
  
    | pin | Number of the I/O pin connected to IR receiver. | 
  
   
- Returns
 - device value. 
 
 
 
      
        
          | void sirc_setTimeout  | 
          ( | 
          int  | 
          ms | ) | 
           | 
        
      
 
Set the time limit to wait for a SONY IR remote packet. 
- Parameters
 - 
  
    | ms | The number of milliseconds to wait.  |