Class Module for EA DOGS102 Graphic LCD display SPI Interface

Dependents:   mDotEVBM2X MTDOT-EVB-LinkCheck-AL MTDOT-EVBDemo-DRH MTDOT_BOX_EVB_LCD_Helloworld ... more

Revision:
1:3b02b7fb79c9
Parent:
0:f40dbeaefe69
Child:
4:8797ad72a9a8
--- a/DOGS102.cpp	Mon Jul 06 19:37:13 2015 +0000
+++ b/DOGS102.cpp	Thu Jul 09 20:30:07 2015 +0000
@@ -2,7 +2,7 @@
  * @file    DOGS102.cpp
  * @brief   Device driver - DOGS102 102x64 pixel Graphic LCD display W/RTOS Support
  * @author  Tim Barr
- * @version 1.0
+ * @version 1.01
  * @see     http://www.lcd-module.com/eng/pdf/grafik/dogs102-6e.pdf
  * @see     http://www.lcd-module.com/eng/pdf/zubehoer/uc1701.pdf
  *
@@ -19,6 +19,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
+ *
+ * 07/08/15 TAB  Fixed error boundary check error in endUpdate
  */
  
 #include "DOGS102.h"
@@ -155,11 +157,8 @@
 
 void DOGS102::endUpdate(void)
 {
-	_update_flag--;
-	
-	// fix boundary issue
-	if (_update_flag < 0)
-	    _update_flag = 0;
+	if (_update_flag != 0)
+		_update_flag--;
 	
 	if (_update_flag == 0)
 	{