move defines to header-file
This commit is contained in:
@@ -4,9 +4,8 @@
|
|||||||
#include<string.h>
|
#include<string.h>
|
||||||
#include<unistd.h>
|
#include<unistd.h>
|
||||||
#include<string.h>
|
#include<string.h>
|
||||||
|
#include "gpio.h"
|
||||||
|
|
||||||
#define BASEPATH "/sys/class/gpio/"
|
|
||||||
#define GPIO_FOLDER "gpio%s/"
|
|
||||||
|
|
||||||
void writeFile(char *filename, char *buffer, size_t count)
|
void writeFile(char *filename, char *buffer, size_t count)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
#ifndef GPIO_H_
|
#ifndef GPIO_H_
|
||||||
#define GPIO_H_
|
#define GPIO_H_
|
||||||
|
|
||||||
|
#define BASEPATH "/sys/class/gpio/"
|
||||||
|
#define GPIO_FOLDER "gpio%s/"
|
||||||
|
|
||||||
void writeFile(char *filename, char *buffer, size_t count);
|
void writeFile(char *filename, char *buffer, size_t count);
|
||||||
void registerPin(char *pin);
|
void registerPin(char *pin);
|
||||||
void freePin(char *pin);
|
void freePin(char *pin);
|
||||||
|
|||||||
Reference in New Issue
Block a user