/************************************************************************/ /* */ /* Motorpotiplatine Steuerung */ /* */ /* Author : Frank Link */ /* franklink61@aol.com */ /* Version: 1.0 */ /************************************************************************/ /* Tastenbelegung TYPE1 = Belegung aller 5 digitalen Ausgänge gegenseitig verriegelt TYPE2 = Belegung von 4 digitalen Ausgänge gegenseitig verriegelt und 1 x ein- / ausschalten */ #define BUTTONSHEADER // #define TYPE1 #define TYPE2 #define ALL_OFF 0b00000000 #ifdef TYPE1 #define CHANNEL1_INIT 0b00010000 // Nach einem Reset ist der Port 5 aktiv #define CHANNEL1 0b00010000 #define CHANNEL2 0b00001000 #define CHANNEL3 0b00000100 #define CHANNEL4 0b00100000 #define CHANNEL5 0b01000000 #define IR_ON 0x00 #define IR_OFF 0x00 #define MAX_CHANNELS 0x05 // Anzahl der digitalen Ausgänge = 5 #endif #ifdef TYPE2 #define CHANNEL1_INIT 0b00000000 // Nach einem Reset ist kein Port aktiv #define CHANNEL1 0b01010000 #define CHANNEL2 0b01001000 #define CHANNEL3 0b01000100 #define CHANNEL4 0b01100000 #define CHANNEL5 0b01100000 #define IR_ON 0x01 #define IR_OFF 0x00 #define MAX_CHANNELS 0x04 // Anzahl der digitalen Ausgänge = 4 #endif char sendCode( char test ); char isKey_on_off( char device, char key ); char isKey_1( char device, char key ); char isKey_2( char device, char key ); char isKey_3( char device, char key ); char isKey_4( char device, char key ); char isKey_5( char device, char key ); char isKey_Channel_Up( char device, char key ); char isKey_Channel_Down( char device, char key ); char isKey_Motor_Left( char device, char key ); char isKey_Motor_Right( char device, char key );