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: LV7_LCDtest LV7_Grupa5_Tim003_Zadatak1 lv7_Grupa5_Tim008_zad1 LV7_PAI_Grupa5_tim10_Zadatak1 ... more
Revision 50:e73cd097fdcb, committed 2020-01-22
- Comitter:
- eencae
- Date:
- Wed Jan 22 12:50:25 2020 +0000
- Parent:
- 49:93355c01e261
- Child:
- 51:32f9ffeafb6d
- Commit message:
- Added overloaded constructor for Gamepad2
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 Mon Mar 19 13:44:23 2018 +0000
+++ b/N5110.cpp Wed Jan 22 12:50:25 2020 +0000
@@ -38,6 +38,17 @@
_dc(new DigitalOut(dcPin))
{}
+// Second overload contructor uses the New Gamepad (Rev 2.1) pin mappings
+N5110::N5110()
+ :
+ _spi(new SPI(PTD2,NC,PTD1)), // create new SPI instance and initialise
+ _led(new DigitalOut(PTB23)),
+ _pwr(NULL), // pwr not needed so null it to be safe
+ _sce(new DigitalOut(PTB19)),
+ _rst(new DigitalOut(PTC1)),
+ _dc(new DigitalOut(PTB18))
+{}
+
N5110::~N5110()
{
delete _spi;
--- a/N5110.h Mon Mar 19 13:44:23 2018 +0000
+++ b/N5110.h Wed Jan 22 12:50:25 2020 +0000
@@ -227,6 +227,10 @@
PinName const sclkPin,
PinName const ledPin);
+ /** Creates a N5110 object with the New Gamepad (Rev 2.1) pin mapping
+ */
+ N5110();
+
/**
* Free allocated memory when object goes out of scope
*/
