updates

Dependencies:   BLE_API mbed-dev-bin nRF51822

Fork of microbit-dal-eddystone by Martin Woolley

Files at this revision

API Documentation at this revision

Comitter:
LancasterUniversity
Date:
Wed Jul 13 12:18:51 2016 +0100
Parent:
70:ce33cdf741b5
Child:
72:4e4f3992099d
Commit message:
Synchronized with git rev ff547977
Author: Joe Finney
microbit: Removed dependency on microbit target for MicroBitDisplay

- removed ROW1 and COL1 dependencies that are defined in the bbc-microbit
family of mbed targets, so that microbit-dal can be compiled for other mbed
targets. #172

- removed legacy reference to the default microbitMatrixMap in
MicroBitDisplay, in favour of the map configured through the constructor.

Changed in this revision

inc/drivers/MicroBitMatrixMaps.h Show annotated file Show diff for this revision Revisions of this file
source/drivers/MicroBitDisplay.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/inc/drivers/MicroBitMatrixMaps.h	Wed Jul 13 12:18:50 2016 +0100
+++ b/inc/drivers/MicroBitMatrixMaps.h	Wed Jul 13 12:18:51 2016 +0100
@@ -70,6 +70,9 @@
  */
 #define MICROBIT_DISPLAY_WIDTH                  5
 #define MICROBIT_DISPLAY_HEIGHT                 5
+#define MICROBIT_DISPLAY_ROW1                   p13
+#define MICROBIT_DISPLAY_COL1                   p4
+
 
 #if MICROBIT_DISPLAY_TYPE == MICROBUG_REFERENCE_DEVICE
 
@@ -149,9 +152,9 @@
     MICROBIT_DISPLAY_HEIGHT,
     MICROBIT_DISPLAY_ROW_COUNT,
     MICROBIT_DISPLAY_COLUMN_COUNT,
-    ROW1,
-    COL1,
+    MICROBIT_DISPLAY_ROW1,
+    MICROBIT_DISPLAY_COL1,
     microbitDisplayMap
 };
 
-#endif
+#endif
\ No newline at end of file
--- a/source/drivers/MicroBitDisplay.cpp	Wed Jul 13 12:18:50 2016 +0100
+++ b/source/drivers/MicroBitDisplay.cpp	Wed Jul 13 12:18:51 2016 +0100
@@ -139,7 +139,7 @@
         return;
 
     // Calculate the bitpattern to write.
-    uint32_t row_data = 0x01 << (microbitMatrixMap.rowStart + strobeRow);
+    uint32_t row_data = 0x01 << (matrixMap.rowStart + strobeRow);
     uint32_t col_data = 0;
 
     for (int i = 0; i < matrixMap.columns; i++)
@@ -208,7 +208,7 @@
 
 void MicroBitDisplay::renderGreyscale()
 {
-    uint32_t row_data = 0x01 << (microbitMatrixMap.rowStart + strobeRow);
+    uint32_t row_data = 0x01 << (matrixMap.rowStart + strobeRow);
     uint32_t col_data = 0;
 
     // Calculate the bitpattern to write.