File source
#include <fitkitlib>
#include "color.h"
void Color::red(){
P4DIR |= PIN_BLUE | PIN_GREEN | PIN_RED;
P4OUT &= ~ (PIN_BLUE | PIN_GREEN);
P4OUT |= PIN_RED;
}
void Color::green(){
P4DIR |= PIN_BLUE | PIN_GREEN | PIN_RED;
P4OUT &= ~ (PIN_BLUE | PIN_RED);
P4OUT |= PIN_GREEN;
}
void Color::blue(){
P4DIR |= PIN_BLUE | PIN_GREEN | PIN_RED;
P4OUT &= ~ (PIN_RED | PIN_GREEN);
P4OUT |= PIN_BLUE;
}
void Color::white(){
P4DIR |= PIN_BLUE | PIN_GREEN | PIN_RED;
P4OUT |= PIN_RED | PIN_GREEN | PIN_BLUE;
}
void Color::off(){
P4DIR |= PIN_BLUE | PIN_GREEN | PIN_RED;
P4OUT &= ~ (PIN_RED | PIN_GREEN | PIN_BLUE);
}