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.
Diff: Afficheur.cpp
- Revision:
- 7:b1b4db3eedb4
- Parent:
- 2:3576839565ae
- Child:
- 8:5124be43c963
--- a/Afficheur.cpp Tue Sep 05 00:05:38 2017 +0000
+++ b/Afficheur.cpp Tue Sep 05 09:50:38 2017 +0000
@@ -1,23 +1,28 @@
#include "Afficheur.h"
-
+#ifdef USESPI
Afficheur::Afficheur():afficheur(p5,p6,p7),chipSelect(p8)
{
afficheur.format(8,0);
afficheur.frequency(50000);
chipSelect = 0;
}
-
+#else
+ Afficheur::Afficheur():afficheur(),chipSelect(p8)
+ {
+ chipSelect = 1;
+ }
+#endif
void Afficheur::write(char* characters,int length )
{
- static char buf[20];
- resetDisplay();
+ char buf[20];
+ //resetDisplay();
afficheur.write(characters,length,buf,20);
}
void Afficheur::write(char ch)
{
- static char buf[1];
+ char buf[1];
afficheur.write(&ch,1,buf,1);
}
void Afficheur::resetDisplay()
