--- a/lib/mbselib.h Sat May 03 23:21:00 2014 +0200 +++ b/lib/mbselib.h Sun May 04 17:18:27 2014 +0200 @@ -5,6 +5,7 @@ #include <stdlib.h> #include <stdio.h> +#include <stdint.h> #include <string.h> #include <ctype.h> #include <sys/types.h> @@ -73,9 +74,9 @@ #ifdef HAVE_WIRINGPI_H + /* lcd-pcf8574.c */ // Defines for the pcf8574 Pi LCD interface board - #define AF_BASE 100 #define AF_RS (AF_BASE + 0) @@ -90,6 +91,62 @@ void setBacklight (int); int initLCD (int, int); + + +/* rc-switch.c */ +#define CHANGE 1 + +//typedef uint8_t boolean; +//typedef uint8_t byte; + +// Number of maximum High/Low changes per packet. +// We can handle up to (unsigned long) => 32 bit * 2 H/L changes per bit + 2 for sync +#define RCSWITCH_MAX_CHANGES 67 + +#define PROTOCOL3_SYNC_FACTOR 71 +#define PROTOCOL3_0_HIGH_CYCLES 4 +#define PROTOCOL3_0_LOW_CYCLES 11 +#define PROTOCOL3_1_HIGH_CYCLES 9 +#define PROTOCOL3_1_LOW_CYCLES 6 + + +void switchOn(int, int); +void switchOff(int, int); +/* +void switchOn(char* sGroup, int nSwitchNumber); +void switchOff(char* sGroup, int nSwitchNumber); +void switchOn(char sFamily, int nGroup, int nDevice); +void switchOff(char sFamily, int nGroup, int nDevice); +void switchOn(char* sGroup, char* sDevice); +void switchOff(char* sGroup, char* sDevice); +void switchOn(char sGroup, int nDevice); +void switchOff(char sGroup, int nDevice); +*/ +//void sendTriState(char* Code); +//void send(unsigned long Code, unsigned int length); +//void send(char* Code); + +void enableReceiveIRQ(int interrupt); +void enableReceive(void); +void disableReceive(void); +bool available(void); +void resetAvailable(void); + +unsigned long getReceivedValue(void); +unsigned int getReceivedBitlength(void); +unsigned int getReceivedDelay(void); +unsigned int getReceivedProtocol(void); +unsigned int *getReceivedRawdata(void); + +void enableTransmit(int); +void disableTransmit(void); +void setPulseLength(int); +void setRepeatTransmit(int); +void setReceiveTolerance(int); +void setProtocol(int); +//void setProtocol(int nProtocol, int nPulseLength); + + #endif