ardupilot/libraries/AP_HAL_SMACCM/GPIO.cpp
James Bielman a4af314b57 Add AP_HAL_SMACCM implementation.
- Add a board definition for SMACCMPilot.
- Support the SMACCM HAL in required utility libraries.
2013-01-03 13:48:06 -08:00

58 lines
784 B
C++

#include "GPIO.h"
using namespace SMACCM;
SMACCMGPIO::SMACCMGPIO()
{
}
void SMACCMGPIO::init()
{
}
void SMACCMGPIO::pinMode(uint8_t pin, uint8_t output)
{
}
uint8_t SMACCMGPIO::read(uint8_t pin)
{
return 0;
}
void SMACCMGPIO::write(uint8_t pin, uint8_t value)
{
}
/* Alternative interface: */
AP_HAL::DigitalSource* SMACCMGPIO::channel(uint16_t n)
{
return NULL;
}
/* Interrupt interface: */
bool SMACCMGPIO::attach_interrupt(uint8_t interrupt_num, AP_HAL::Proc p,
uint8_t mode)
{
return true;
}
SMACCMDigitalSource::SMACCMDigitalSource(uint8_t v) :
_v(v)
{
}
void SMACCMDigitalSource::mode(uint8_t output)
{
}
uint8_t SMACCMDigitalSource::read()
{
return _v;
}
void SMACCMDigitalSource::write(uint8_t value)
{
_v = value;
}