Kommunikation hat funktioniert
This commit is contained in:
37
io/io.h
Executable file
37
io/io.h
Executable file
@@ -0,0 +1,37 @@
|
||||
#if !defined(__IO_H__)
|
||||
#define __IO_H__
|
||||
|
||||
#include <wiringPi.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define GPIO_LED_MOTRUN 17 // GPIO Pin fuer LED Motor läuft
|
||||
|
||||
#define GPIO_KEY_STOP 26 // GPIO Pin fuer Taster Stop
|
||||
#define GPIO_KEY_PWRUP 5 // GPIO Pin fuer Taster Leistung-Erhöhen
|
||||
#define GPIO_KEY_PWRDOWN 6 // GPIO Pin fuer Taster Leistung-Verringern
|
||||
|
||||
#define KEY_RISING_FILTERCYCLES 5 // Filterwert für Eingänge steigende Flanke
|
||||
#define KEY_FALLING_FILTERCYCLES 15 // Filterwert für Eingänge (Zyklen-Zähler)
|
||||
#define KEY_START_REPEAT_CYCLECOUNT 50 // Anzahl Zyklen, nach denen Wiederholungen beginnen
|
||||
#define KEY_REPEAT_CYCLECOUNT 50 // Anzahl Zyklen, nach den wiederholt wird
|
||||
|
||||
// Datenstruktur für einen Taster
|
||||
struct GPIO_KEY_DATA
|
||||
{
|
||||
int iKeyPin;
|
||||
int iKeyValue;
|
||||
int iKeyRisingEdge;
|
||||
int iKeyFallingEdge;
|
||||
unsigned int nHighCycleCounter;
|
||||
unsigned int nLowCycleCounter;
|
||||
int iKeyPressedCycleCounter;
|
||||
int iKeyRepeatCycleCounter;
|
||||
};
|
||||
|
||||
int IO_Init();
|
||||
void IO_DoCyclic();
|
||||
void SetupKeyPin(struct GPIO_KEY_DATA *pdata, int iKeyPin);
|
||||
void SetupOutputPin(int iOutPin);
|
||||
void WriteOutputPin(int iOutPin, int iValue);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user