#include "e_remote_control.h"
#include "../e_epuck_ports.h"
#include "e_agenda.h"
#include "e_led.h"
Functions | |
| void | e_init_remote_control (void) |
| Initialise the IR receiver ports. | |
| void | __attribute__ ((__interrupt__, auto_psv)) |
| void | e_read_remote_control (void) |
| Read the signal and stock the information. | |
| unsigned char | e_get_check (void) |
| Read the check bit. | |
| unsigned char | e_get_address (void) |
| Read the adress of the commande. | |
| unsigned char | e_get_data (void) |
| Read the data of the command. | |
Variables | |
| static unsigned char | address_temp = 0 |
| static unsigned char | data_temp = 0 |
| static unsigned char | check_temp = 0 |
| static unsigned char | address = 0 |
| static unsigned char | data = 0 |
| static unsigned char | check = 2 |
This module manage the IR receiver with the agenda solution (timer2).
Alittle exemple to manage the IR remote (the body LED change his state when you press a button of the IR controller).
#include <p30f6014A.h> #include <motor_led/e_epuck_ports.h> #include <motor_led/e_init_port.h> #include <motor_led/advance_one_timer/e_remote_control.h> #include <motor_led/advance_one_timer/e_agenda.h> int main(void) { int ir_check; int previous_check = 0; e_init_port(); e_init_remote_control(); e_start_agendas_processing(); while(1) { ir_check = e_get_check(); if(ir_check != previous_check) BODY_LED = BODY_LED^1; previous_check = ir_check; } }
| void __attribute__ | ( | (__interrupt__, auto_psv) | ) |
| unsigned char e_get_address | ( | void | ) |
Read the adress of the commande.
| unsigned char e_get_check | ( | void | ) |
Read the check bit.
| unsigned char e_get_data | ( | void | ) |
Read the data of the command.
| void e_init_remote_control | ( | void | ) |
Initialise the IR receiver ports.
| void e_read_remote_control | ( | void | ) |
Read the signal and stock the information.
unsigned char address = 0 [static] |
unsigned char address_temp = 0 [static] |
unsigned char check = 2 [static] |
unsigned char check_temp = 0 [static] |
unsigned char data = 0 [static] |
unsigned char data_temp = 0 [static] |
1.5.4