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.
Dependents: DirectSPI-test wave_player_super_lite
Revision 3:63cc20b0895b, committed 2017-02-28
- Comitter:
- mimi3
- Date:
- Tue Feb 28 22:00:46 2017 +0900
- Parent:
- 2:1faa28f1a5bb
- Child:
- 4:f63f07d07d5a
- Commit message:
- update
Changed in this revision
| DirectSPI.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/DirectSPI.h Thu Feb 23 22:25:39 2017 +0900
+++ b/DirectSPI.h Tue Feb 28 22:00:46 2017 +0900
@@ -1,3 +1,6 @@
+#ifndef __DIRECTSPI_H_
+#define __DIRECTSPI_H_
+
#include "mbed.h"
#include "PeripheralPins.h"
#define TODO 0
@@ -9,6 +12,10 @@
uint16_t directWrite8(uint16_t data);
uint16_t directWrite16(uint16_t data);
uint16_t directWrite(uint16_t data);
+ void operator = (uint8_t d8){
+ volatile uint16_t res;
+ res = directWrite8( d8 );
+ }
protected:
SPI_TypeDef *spi;
#if TODO
@@ -18,3 +25,5 @@
#endif
};
+#endif /* __DIRECTSPI_H_ */
+