ad-astra/ad_astra/AdAstra/src/driver/infra/infra.h
schmelczerandras 3da2a7a7c2 Minor fixes
2020-04-20 17:33:58 +02:00

24 lines
549 B
C

#ifndef INFRA_H
#define INFRA_H
#include <stdbool.h>
#include <avr/io.h>
/*
Custom NEC implementation using a TSOP4838
*/
#define INFRA_ADDRESS 255
#define IR_PIN PB4
#define REPEAT_CODE 1
typedef void (*OnCommandReceived)(uint8_t);
typedef void (*OnReceiveStarted)();
// Initialize infra and call onCommandReceived with every received byte
// Call onCommandReceived with the argument REPEAT_CODE if a repeat code
// has been received.
void initializeInfra(OnCommandReceived onCommandReceived, OnReceiveStarted onReceiveStarted);
#endif