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.
Fork of N5110 by
Revision 20:b627f726b323, committed 2016-05-25
- Comitter:
- esokic
- Date:
- Wed May 25 07:59:24 2016 +0000
- Parent:
- 19:ba8addc061ea
- Commit message:
- Popravljena biblioteka za nokia display
Changed in this revision
| N5110.cpp | Show annotated file Show diff for this revision Revisions of this file |
| N5110.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/N5110.cpp Thu Apr 23 18:57:52 2015 +0000
+++ b/N5110.cpp Wed May 25 07:59:24 2016 +0000
@@ -6,12 +6,13 @@
*/
#include "mbed.h"
#include "N5110.h"
+#include "SWSPI.h"
N5110::N5110(PinName pwrPin, PinName scePin, PinName rstPin, PinName dcPin, PinName mosiPin, PinName sclkPin, PinName ledPin)
{
- spi = new SPI(mosiPin,NC,sclkPin); // create new SPI instance and initialise
+ spi = new SWSPI(mosiPin,PTC0,sclkPin); // create new SPI instance and initialise
initSPI();
// set up pins as required
--- a/N5110.h Thu Apr 23 18:57:52 2015 +0000
+++ b/N5110.h Wed May 25 07:59:24 2016 +0000
@@ -30,7 +30,7 @@
#define CMD_BI_MUX_48 0x13
#define CMD_BI_MUX_100 0x10
#define CMD_VOP_6V06 0xB2
-#define CMD_VOP_7V38 0xC8
+#define CMD_VOP_7V38 0xC0
// number of pixels on display
#define WIDTH 84
@@ -38,6 +38,7 @@
#define BANKS 6
#include "mbed.h"
+#include "SWSPI.h"
/**
@brief Library for interfacing with Nokia 5110 LCD display (https://www.sparkfun.com/products/10168) using the hardware SPI on the mbed.
@@ -330,7 +331,7 @@
unsigned char buffer[84][6]; // screen buffer - the 6 is for the banks - each one is 8 bits;
private: // private variables
- SPI* spi;
+ SWSPI* spi;
PwmOut* led;
DigitalOut* pwr;
DigitalOut* sce;
