Fixes error with multiple definitions

This commit is contained in:
Johannes Wendel
2020-02-19 14:12:39 +01:00
parent e4ed6654aa
commit d84dfe5063
2 changed files with 9 additions and 8 deletions

View File

@@ -16,6 +16,9 @@
#define INPUT_SLEEP_DURATION_NANO 800
#define INPUT_HANDLER_TIMEOUT_MILLI 2000
#define DISPLAY_HIGH 0
#define DISPLAY_LOW 1
#define PULLDOWN false
#define DISPLAY_SLEEP_TIME_MILLI 1

View File

@@ -2,16 +2,14 @@
// Created by johannes on 17.07.19.
//
#ifndef FLIPPR_DRIVER_WIRINGPITESTING_H
#define FLIPPR_DRIVER_WIRINGPITESTING_H
#ifndef FLIPPR_DRIVER_TEST_WIRINGPITESTING_H
#define FLIPPR_DRIVER_TEST_WIRINGPITESTING_H
#include <iostream>
#include <random>
#define INPUT 0
#define OUTPUT 1
#define DISPLAY_HIGH 0
#define DISPLAY_LOW 1
static int wiringPiSetup()
{
@@ -19,24 +17,24 @@ static int wiringPiSetup()
return 0;
}
void pinMode(int pin, int mode)
static void pinMode(int pin, int mode)
{
//std::cout << "Set pin " << pin << " into mode " << mode << std::endl;
}
int digitalRead(int pin)
static int digitalRead(int pin)
{
//std::cout << "Reading pin " << pin << std::endl
return rand()%2 == 0 ? 1 : 0;
}
void digitalWrite(int pin, int value)
static void digitalWrite(int pin, int value)
{
//std::cout << "Writing pin " << pin << " with value " << value << std::endl;
}
int mcp23017Setup(const int pinBase, const int i2cAddress)
static int mcp23017Setup(const int pinBase, const int i2cAddress)
{
//std::cout << "mcp23017Setup called with pinBase " << pinBase << " and i2cAddress " << i2cAddress << std::endl;