dereviated gpiointerface
This commit is contained in:
32
FlippR-Driver/src/utilities/InputGPIOInterface.cpp
Normal file
32
FlippR-Driver/src/utilities/InputGPIOInterface.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* InputGPIOInterface.cpp
|
||||
*
|
||||
* Created on: May 31, 2018
|
||||
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
|
||||
*/
|
||||
#include "InputGPIOInterface.h"
|
||||
|
||||
|
||||
class InputGPIOInterface
|
||||
{
|
||||
|
||||
bool InputGPIOInterface::read_input_data()
|
||||
{
|
||||
return read_pin(this->input_data_address);
|
||||
}
|
||||
|
||||
void InputGPIOInterface::write_input_row(char data)
|
||||
{
|
||||
write_pin(this->input_row_address, data & 0b001);
|
||||
write_pin(this->input_row_address, data & 0b010);
|
||||
write_pin(this->input_row_address, data & 0b100);
|
||||
}
|
||||
|
||||
void InputGPIOInterface::write_input_col(char data)
|
||||
{
|
||||
write_pin(this->input_col_address, data & 0b001);
|
||||
write_pin(this->input_col_address, data & 0b010);
|
||||
write_pin(this->input_col_address, data & 0b100);
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user