add function registerInput
This commit is contained in:
@@ -40,6 +40,12 @@ void registerOutput(char *pin)
|
||||
setDirection(pin, "out", 3);
|
||||
}
|
||||
|
||||
void registerInput(char *pin)
|
||||
{
|
||||
registerPin(pin);
|
||||
setDirection(pin, "in", 3);
|
||||
}
|
||||
|
||||
void writeOutput(char *pin, int state)
|
||||
{
|
||||
char path[50];
|
||||
|
||||
@@ -10,6 +10,7 @@ void registerPin(char *pin);
|
||||
void freePin(char *pin);
|
||||
void setDirection(char *pin, char *direction, int dirlen);
|
||||
void registerOutput(char *pin);
|
||||
void registerInput(char *pin);
|
||||
void writeOutput(char *pin, int state);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user