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.
Dependencies: mbed APDS_9960 mbed-rtos
Diff: include/cSPI.h
- Revision:
- 9:6f3d8b714a59
- Child:
- 28:e932eb039271
- Child:
- 35:7aef0bbdf335
diff -r 92d0c4961a16 -r 6f3d8b714a59 include/cSPI.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/include/cSPI.h Wed Apr 06 21:53:55 2016 +0000
@@ -0,0 +1,41 @@
+/*
+ * cSPI.h
+ *
+ * Created on: 5 avr. 2016
+ * Author: clement
+ */
+
+#ifndef CSPI_H_
+#define CSPI_H_
+
+#include "mbed.h"
+#include "cMatrice.h"
+
+class cSPI {
+private:
+ unsigned int _freq;
+ unsigned char _mode;
+ unsigned char _bits;
+
+public:
+ // CONSTRUCTEURS
+ cSPI();
+ // DESTRUCTEUR
+ ~cSPI();
+ // GETTERS
+ unsigned int getFrequence();
+ unsigned int getMode();
+ unsigned char getBits();
+
+ // SETTERS
+ void setFrequence(unsigned int freq);
+ void setMode(unsigned int mode);
+ void setBits(unsigned char bits);
+ // METHODES
+ void initSPI(unsigned int frequence, unsigned int bits, unsigned int mode);
+ int envoyerMatrice(cMatrice &); // Renvoi la reponse SPI
+
+
+};
+
+#endif /* CSPI_H_ */