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: akiledmatrix.h
- Revision:
- 11:392395419b14
- Parent:
- 10:9ce938cdeb33
diff -r 9ce938cdeb33 -r 392395419b14 akiledmatrix.h
--- a/akiledmatrix.h Sun Jun 02 16:59:52 2013 +0000
+++ b/akiledmatrix.h Mon Jun 03 15:11:30 2013 +0000
@@ -24,7 +24,7 @@
* // 9 GND
* // 10 GND
*
- * AkiLedMatrix ledmatrix(p5, p6, p7, p8, p9, p10);
+ * AkiLedMatrix ledmatrix(p5, p6, p7, p8, p9, p10, 1);
*
* int main() {
* const unsigned char buf[] = {
@@ -48,7 +48,7 @@
* int delay = 1000; // dynamic time (us)
*
* while(1){
- * ledmatrix.display(buf, delay, ledunit);
+ * ledmatrix.display(buf, delay);
* }
* }
* @endcode
@@ -62,13 +62,15 @@
* @param clock CLOCK IN
* @param latch LATCH IN
* @param strobe STROBE IN
+ * @param maxledunit The number of LED units.
*/
AkiLedMatrix(PinName sin1,
PinName sin2,
PinName sin3,
PinName clock,
PinName latch,
- PinName strobe);
+ PinName strobe,
+ int maxledunit);
/** Displays the contents of the buffer
*
@@ -78,10 +80,11 @@
* @returns
* void
*/
- void display(const unsigned char *buffer, const unsigned int delay, const unsigned int ledunit);
+ void display(unsigned char *buffer, int delay = 1000);
private:
DigitalOut _sin1,_sin2,_sin3,_clock,_latch,_strobe;
+ int _maxledunit;
};
#endif
\ No newline at end of file