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
include/cSPI.h@35:7aef0bbdf335, 2016-04-22 (annotated)
- Committer:
- clementdoreau
- Date:
- Fri Apr 22 13:49:03 2016 +0000
- Revision:
- 35:7aef0bbdf335
- Parent:
- 9:6f3d8b714a59
- Child:
- 36:f58a566595ad
R?cup?r??????
Who changed what in which revision?
| User | Revision | Line number | New 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 |
| clementdoreau | 35:7aef0bbdf335 | 35 | void initSPI(unsigned int frequence); |
| Willheisen | 9:6f3d8b714a59 | 36 | int envoyerMatrice(cMatrice &); // Renvoi la reponse SPI |
| clementdoreau | 35:7aef0bbdf335 | 37 | void setNbMatrice(unsigned int nb); |
| Willheisen | 9:6f3d8b714a59 | 38 | |
| Willheisen | 9:6f3d8b714a59 | 39 | }; |
| Willheisen | 9:6f3d8b714a59 | 40 | |
| Willheisen | 9:6f3d8b714a59 | 41 | #endif /* CSPI_H_ */ |