SmartWheels self-driving race car. Designed for NXP Cup. Uses FRDM-KL25Z, area-scan camera, and simple image processing to detect and navigate any NXP spec track.

Dependencies:   TSI USBDevice mbed-dev

Fork of SmartWheels by haofan Zheng

Branch:
Drift
Revision:
79:bdbac82c979b
Parent:
57:0d8a155d511d
Child:
81:32bd7a25a699
diff -r 9f20bf037db6 -r bdbac82c979b Hardwares/ArduUTFT.cpp
--- a/Hardwares/ArduUTFT.cpp	Mon Apr 17 16:02:48 2017 +0000
+++ b/Hardwares/ArduUTFT.cpp	Tue Apr 18 17:43:12 2017 +0000
@@ -31,56 +31,35 @@
 
 static DigitalOut utft_cs(PIN_AUC_CS, 1);
 static DigitalOut utft_sd_cs(PIN_AUC_SD_CS, 1);
-static DigitalOut utft_touch_cs(PIN_AUC_TOUCH_CS, 1);
 
 inline void ardu_cam_spi_write_8(int address, int value)
 {
-#ifdef SW_DEBUG
-    g_sw_spi_lock.lock();
-#endif
     utft_cs = 0;
     g_spi_port.write(address | 0x80);
     g_spi_port.write(value);
     utft_cs = 1;
-#ifdef SW_DEBUG
-    g_sw_spi_lock.unlock();
-#endif
 }
 
 inline uint8_t ardu_cam_spi_read_8(int address)
-{ 
-#ifdef SW_DEBUG
-    g_sw_spi_lock.lock();
-#endif
+{
     utft_cs = 0;
     g_spi_port.write(address & 0x7F);
     uint8_t value = static_cast<uint8_t>(g_spi_port.write(0x00));
     utft_cs = 1;
-#ifdef SW_DEBUG
-    g_sw_spi_lock.unlock();
-#endif
+
     return value;
 }
 
 inline void ardu_utft_write_COM_internal(uint8_t VL)  
 {   
-#ifdef SW_DEBUG
-    g_sw_spi_lock.lock();
-#endif
     utft_cs = 0;
     g_spi_port.write(0xBE);
     g_spi_port.write(VL);
     utft_cs = 1;
-#ifdef SW_DEBUG
-    g_sw_spi_lock.unlock();
-#endif
 }
  
 inline void ardu_utft_write_DATA_internal(uint8_t VH, uint8_t VL)
 {
-#ifdef SW_DEBUG
-    g_sw_spi_lock.lock();
-#endif
     utft_cs = 0;
     g_spi_port.write(0xBF);
     g_spi_port.write(VH);
@@ -89,9 +68,7 @@
     g_spi_port.write(0xBF);
     g_spi_port.write(VL);
     utft_cs = 1;
-#ifdef SW_DEBUG
-    g_sw_spi_lock.unlock();
-#endif
+
 }
 
 inline void ardu_utft_write_COM_DATA_internal(uint8_t com1, uint16_t dat1)