mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-03 12:14:10 -04:00
uncrustify libraries/AP_Relay/AP_Relay.cpp
This commit is contained in:
parent
c60cfb33f2
commit
06021825c8
@ -9,41 +9,41 @@
|
|||||||
|
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#if defined(ARDUINO) && ARDUINO >= 100
|
#if defined(ARDUINO) && ARDUINO >= 100
|
||||||
#include "Arduino.h"
|
#include "Arduino.h"
|
||||||
#else
|
#else
|
||||||
#include "wiring.h"
|
#include "wiring.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "AP_Relay.h"
|
#include "AP_Relay.h"
|
||||||
|
|
||||||
void AP_Relay::on()
|
void AP_Relay::on()
|
||||||
{
|
{
|
||||||
PORTL |= B00000100;
|
PORTL |= B00000100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AP_Relay::off()
|
void AP_Relay::off()
|
||||||
{
|
{
|
||||||
PORTL &= ~B00000100;
|
PORTL &= ~B00000100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AP_Relay::toggle()
|
void AP_Relay::toggle()
|
||||||
{
|
{
|
||||||
PORTL ^= B00000100;
|
PORTL ^= B00000100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AP_Relay::set(bool status)
|
void AP_Relay::set(bool status)
|
||||||
{
|
{
|
||||||
if (status)
|
if (status)
|
||||||
on();
|
on();
|
||||||
else
|
else
|
||||||
off();
|
off();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool AP_Relay::get()
|
bool AP_Relay::get()
|
||||||
{
|
{
|
||||||
return PORTL & B00000100;
|
return PORTL & B00000100;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user