RaspberrPi project source code
Guo Wenxue
2024-12-29 8517494b239d652ea9a24457faa13f88f55979b9
Update infrared code to support two channels

Signed-off-by: Guo Wenxue <guowenxue@gmail.com>
1 files modified
3 ■■■■■ changed files
modules/infrared.c 3 ●●●●● patch | view | raw | blame | history
modules/infrared.c
@@ -9,6 +9,7 @@
 * Pin connection:
 *               HC-SR501 Module           Raspberry Pi Board
 *                  VCC       <----->      5V
 *                  I/O       <----->      #Pin16(BCM GPIO23)
 *                  I/O       <----->      #Pin18(BCM GPIO24)
 *                  GND       <----->      GND
 *
@@ -34,6 +35,7 @@
enum
{
    IR1 = 0,
    IR2,
    IR_CNT,
};
@@ -49,6 +51,7 @@
static ir_info_t    ir_info[IR_CNT] =
{
    {"IR1", 23, 1, NULL },
    {"IR2", 24, 1, NULL },
};
/* infrared API context */