parent
9e4c8e2a75
commit
8cf59eec6e
@ -0,0 +1,20 @@
|
|||||||
|
cpp_src = $(wildcard *.cpp)
|
||||||
|
|
||||||
|
cpp_obj = $(cpp_src:.cpp=.o)
|
||||||
|
c_obj = $(c_src:.c=.o)
|
||||||
|
CC = g++
|
||||||
|
CFLAGS = -Wall -pedantic #-li2c -lpthread
|
||||||
|
LDFLAGS =
|
||||||
|
EXEC = runtest
|
||||||
|
|
||||||
|
|
||||||
|
all : $(EXEC)
|
||||||
|
|
||||||
|
$(EXEC): $(cpp_obj) $(c_obj)
|
||||||
|
$(CC) -pthread -o $@ $^ $(LDFLAGS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(c_obj) $(cpp_obj) $(EXEC)
|
||||||
|
|
||||||
|
cleanall:
|
||||||
|
rm -rf $(c_obj) $(cpp_obj) $(EXEC)
|
@ -0,0 +1,21 @@
|
|||||||
|
#ifndef _IGPIO_HPP_
|
||||||
|
#define IGPIO_HPP_
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
class GPIO
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
GPIO();
|
||||||
|
~GPIO();
|
||||||
|
|
||||||
|
bool read();
|
||||||
|
void write(const bool& logic_state);
|
||||||
|
void toggle();
|
||||||
|
|
||||||
|
private:
|
||||||
|
class GPIO_impl;
|
||||||
|
std::unique_ptr<GPIO_impl> impl;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _IGPIO_HPP_
|
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <iostream>
|
||||||
|
#include <functional>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in new issue