BastatDoreau / Mbed 2 deprecated MoveYourTetris

Dependencies:   mbed APDS_9960 mbed-rtos

Dependents:   MoveYourTetris_OK

Committer:
Willheisen
Date:
Wed Apr 06 21:53:55 2016 +0000
Revision:
9:6f3d8b714a59
Child:
28:e932eb039271
Child:
35:7aef0bbdf335
rotationHoraire pour le L; m?thodes d?placements Bas, Gauche, Droite; ;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Willheisen 9:6f3d8b714a59 1 /*
Willheisen 9:6f3d8b714a59 2 * cSPI.h
Willheisen 9:6f3d8b714a59 3 *
Willheisen 9:6f3d8b714a59 4 * Created on: 5 avr. 2016
Willheisen 9:6f3d8b714a59 5 * Author: clement
Willheisen 9:6f3d8b714a59 6 */
Willheisen 9:6f3d8b714a59 7
Willheisen 9:6f3d8b714a59 8 #ifndef CSPI_H_
Willheisen 9:6f3d8b714a59 9 #define CSPI_H_
Willheisen 9:6f3d8b714a59 10
Willheisen 9:6f3d8b714a59 11 #include "mbed.h"
Willheisen 9:6f3d8b714a59 12 #include "cMatrice.h"
Willheisen 9:6f3d8b714a59 13
Willheisen 9:6f3d8b714a59 14 class cSPI {
Willheisen 9:6f3d8b714a59 15 private:
Willheisen 9:6f3d8b714a59 16 unsigned int _freq;
Willheisen 9:6f3d8b714a59 17 unsigned char _mode;
Willheisen 9:6f3d8b714a59 18 unsigned char _bits;
Willheisen 9:6f3d8b714a59 19
Willheisen 9:6f3d8b714a59 20 public:
Willheisen 9:6f3d8b714a59 21 // CONSTRUCTEURS
Willheisen 9:6f3d8b714a59 22 cSPI();
Willheisen 9:6f3d8b714a59 23 // DESTRUCTEUR
Willheisen 9:6f3d8b714a59 24 ~cSPI();
Willheisen 9:6f3d8b714a59 25 // GETTERS
Willheisen 9:6f3d8b714a59 26 unsigned int getFrequence();
Willheisen 9:6f3d8b714a59 27 unsigned int getMode();
Willheisen 9:6f3d8b714a59 28 unsigned char getBits();
Willheisen 9:6f3d8b714a59 29
Willheisen 9:6f3d8b714a59 30 // SETTERS
Willheisen 9:6f3d8b714a59 31 void setFrequence(unsigned int freq);
Willheisen 9:6f3d8b714a59 32 void setMode(unsigned int mode);
Willheisen 9:6f3d8b714a59 33 void setBits(unsigned char bits);
Willheisen 9:6f3d8b714a59 34 // METHODES
Willheisen 9:6f3d8b714a59 35 void initSPI(unsigned int frequence, unsigned int bits, unsigned int mode);
Willheisen 9:6f3d8b714a59 36 int envoyerMatrice(cMatrice &); // Renvoi la reponse SPI
Willheisen 9:6f3d8b714a59 37
Willheisen 9:6f3d8b714a59 38
Willheisen 9:6f3d8b714a59 39 };
Willheisen 9:6f3d8b714a59 40
Willheisen 9:6f3d8b714a59 41 #endif /* CSPI_H_ */