Mini projet LOO

Dependencies:   mbed APDS_9960 mbed-rtos

Dependents:   MoveYourTetris_OK

Home du projet

src/cLed.cpp

Committer:
Willheisen
Date:
2016-04-06
Revision:
9:6f3d8b714a59
Parent:
7:4b283e36b147
Child:
10:9ef3f520ff6c

File content as of revision 9:6f3d8b714a59:

#include "cLed.h"

// Définition de la classe Led

// CONSTRUCTEURS

cLed::cLed() {
	_positionX = 0;
	_positionY = 0;
	_couleur = 0x00;
}

cLed::cLed(unsigned char x, unsigned char y) {
	_positionX = x;
	_positionY = y;
}

cLed::cLed(unsigned char x, unsigned char y, unsigned char c) {
	_positionX = x;
	_positionY = y;
	_couleur = c;
}

// GETTERS

unsigned char cLed::getPositionX() {
	return _positionX;
}
unsigned char cLed::getPositionY() {
	return _positionY;
}

unsigned char cLed::getCouleur() {
	return _couleur;
}

// SETTER

void cLed::setPositionX(unsigned char x) {
	_positionX = x;
}

void cLed::setPositionY(unsigned char y) {
	_positionY = y;
}

void cLed::allumer(unsigned char c) {
	_couleur = c;
}

void cLed::eteindre() {
	_couleur = LED_NOIR;
}