Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Matrice.h
00001 #include "mbed.h" 00002 #include "Carre.h" 00003 00004 class Matrice { 00005 public: 00006 void beginSPI(SPI *spi, DigitalOut *cs); // fonction permetant de démarer le SPI 00007 bool getState( void ){return state;} // Fonction retoutnant l'état du bus 00008 void ecrireMatrice(); // Ecris la matrice a partir d'un buffer de 64 00009 00010 //Gestion Jeu 00011 void setDispo(); 00012 void ajoutCarre(char x,char y,int couleur); 00013 void supprimerCarre(char x, char y); 00014 void ajoutCarreAleatroire(); 00015 00016 //Constructeurs 00017 Matrice(); // Constructeur par défaut 00018 Matrice(SPI *spi, DigitalOut *cs); // constructeur avec la liason SPI il es donc nécessaire d'intancier la liason SPI ( new SPI(p6...)) a l'appel 00019 ~Matrice(); 00020 00021 00022 private: 00023 // atributs 00024 SPI *_spi; 00025 DigitalOut *_cs; 00026 bool state; 00027 00028 int buffer [64]; 00029 void ajoutCarretobuffer(int position, int couleur); 00030 void matricetobuffer(); 00031 // 00032 char matricedispo[4][4]; 00033 Carre* matrice1[4][4]; 00034 00035 };
Generated on Tue Aug 2 2022 07:35:24 by
1.7.2