This is the David Smart RA8875 Library with mods for working with FRDM-K64F

Files at this revision

API Documentation at this revision

Comitter:
lamell
Date:
Sun May 03 10:16:02 2020 -0400
Parent:
200:05ccd555a538
Commit message:
Slight modifications to the library. Mainly to make the speed faster and also changing some parameters from private to public.

Changed in this revision

RA8875.cpp Show annotated file Show diff for this revision Revisions of this file
RA8875.h Show annotated file Show diff for this revision Revisions of this file
diff -r 05ccd555a538 -r 1119f1e9f4e4 RA8875.cpp
--- a/RA8875.cpp	Tue Apr 21 23:45:54 2020 -0400
+++ b/RA8875.cpp	Sun May 03 10:16:02 2020 -0400
@@ -1616,9 +1616,9 @@
 {
     RetCode_t ret;
 
-    PERFORMANCE_RESET;
+    //PERFORMANCE_RESET;
     ret = pixelStream(&color, 1, x,y);
-    REGISTERPERFORMANCE(PRF_DRAWPIXEL);
+    //REGISTERPERFORMANCE(PRF_DRAWPIXEL);
     return ret;
 }
 
@@ -3295,7 +3295,7 @@
     display.line(22,40, 22,42, BrightGreen);
     display.line(24,40, 24,42, BrightBlue);
     // compare point to line-point
-    display.pixel(20,50, BrightRed);
+    display./(20,50, BrightRed);
     display.pixel(22,50, BrightGreen);
     display.pixel(24,50, BrightBlue);
     display.line(20,52, 20,52, BrightRed);
diff -r 05ccd555a538 -r 1119f1e9f4e4 RA8875.h
--- a/RA8875.h	Tue Apr 21 23:45:54 2020 -0400
+++ b/RA8875.h	Sun May 03 10:16:02 2020 -0400
@@ -371,7 +371,7 @@
 #include "RA8875_Touch_GSL1680.h"
 #include "GraphicsDisplay.h"
 
-#define RA8875_DEFAULT_SPI_FREQ 10000000
+#define RA8875_DEFAULT_SPI_FREQ 11000000
 
 #ifndef MBED_ENCODE_VERSION
 #define MBED_MAJOR_VERSION 2
@@ -3231,6 +3231,24 @@
     void AttachIdleHandler(IdleCallback_T callback = NULL) { idle_callback = callback; }
 
 
+    /// Select the peripheral to use it.
+    ///
+    /// @param[in] chipsel when true will select the peripheral, and when false
+    ///     will deselect the chip. This is the logical selection, and
+    ///     the pin selection is the invert of this.
+    /// @returns @ref RetCode_t value.
+    ///
+    RetCode_t _select(bool chipsel);
+
+    /// The most primitive - to write a data value to the SPI interface.
+    ///
+    /// @param[in] data is the value to write.
+    /// @returns a value read from the port, since SPI is often shift
+    ///     in while shifting out.
+    ///
+    unsigned char _spiwrite(unsigned char data);
+
+
 #ifdef PERF_METRICS
     /// Clear the performance metrics to zero.
     void ClearPerformance();
@@ -3426,15 +3444,6 @@
     ///
     color_t _cvt8to16(uint8_t c8);
 
-    /// Select the peripheral to use it.
-    ///
-    /// @param[in] chipsel when true will select the peripheral, and when false
-    ///     will deselect the chip. This is the logical selection, and
-    ///     the pin selection is the invert of this.
-    /// @returns @ref RetCode_t value.
-    ///
-    RetCode_t _select(bool chipsel);
-
     /// Wait while the status register indicates the controller is busy.
     ///
     /// @param[in] mask is the mask of bits to monitor.
@@ -3463,14 +3472,6 @@
     ///
     void _setWriteSpeed(bool writeSpeed);
 
-    /// The most primitive - to write a data value to the SPI interface.
-    ///
-    /// @param[in] data is the value to write.
-    /// @returns a value read from the port, since SPI is often shift
-    ///     in while shifting out.
-    ///
-    unsigned char _spiwrite(unsigned char data);
-
     /// The most primitive - to read a data value to the SPI interface.
     ///
     /// This is really just a specialcase of the write command, where