uncrustify libraries/AP_Relay/AP_Relay.cpp

This commit is contained in:
uncrustify 2012-08-16 23:21:08 -07:00 committed by Pat Hickey
parent c60cfb33f2
commit 06021825c8

View File

@ -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;
} }