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: c128x64spi.h
- Revision:
- 0:b06afbefd350
- Child:
- 1:84b2d36d57f0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/c128x64spi.h Sun Jun 16 13:50:27 2013 +0000
@@ -0,0 +1,27 @@
+#ifndef C128X64SPI_H
+#define C128X64SPI_H
+
+#include "mbed.h"
+
+class c128x64spi {
+public:
+ c128x64spi(PinName mosi, PinName miso, PinName sclk, PinName cs, PinName rs, PinName reset);
+ void pixel(int x, int y, int sw = 1);
+ void clr(int sw = 1);
+ void hline(int x0, int x1, int y, int color = 1);
+ void vline(int x, int y0, int y1, int color = 1);
+ void line(int x0, int y0, int x1, int y1, int color = 1);
+
+private:
+ void wr_cmd(int cmd);
+ void wr_dat(int dat);
+
+ unsigned char gfx_buf[8][128];
+
+ SPI _spi;
+ DigitalOut _cs;
+ DigitalOut _rs;
+ DigitalOut _reset;
+};
+
+#endif
\ No newline at end of file