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

Committer:
hazheng
Date:
Wed Mar 22 23:43:24 2017 +0000
Revision:
40:be98219930e4
Child:
41:7b21c5e3599e
Added code for UTFT screen. Nothing displayed on screen. Maybe screen is broken?

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hazheng 40:be98219930e4 1 #pragma once
hazheng 40:be98219930e4 2 #ifndef ARDU_UTFT_H
hazheng 40:be98219930e4 3 #define ARDU_UTFT_H
hazheng 40:be98219930e4 4
hazheng 40:be98219930e4 5 #include <mbed.h>
hazheng 40:be98219930e4 6 #include "PinAssignment.h"
hazheng 40:be98219930e4 7
hazheng 40:be98219930e4 8 #define ARDUCHIP_MODE 0x02 //Mode register
hazheng 40:be98219930e4 9 //#define MCU2LCD_MODE 0x00
hazheng 40:be98219930e4 10 //#define CAM2LCD_MODE 0x01
hazheng 40:be98219930e4 11 #define MCU2LCD_MODE 0x01
hazheng 40:be98219930e4 12 #define CAM2LCD_MODE 0x02
hazheng 40:be98219930e4 13 //#define LCD2MCU_MODE 0x04
hazheng 40:be98219930e4 14
hazheng 40:be98219930e4 15 #define ARDUCHIP_TEST1_UTFT 0x00 //TEST register
hazheng 40:be98219930e4 16 #define ARDUCHIP_TEST_MSG_UTFT 0x72
hazheng 40:be98219930e4 17
hazheng 40:be98219930e4 18 #define ARDUCHIP_VER_NUM_UTFT 0x61
hazheng 40:be98219930e4 19
hazheng 40:be98219930e4 20 void ardu_utft_init(); //We only use LANDSCAPE orientation!
hazheng 40:be98219930e4 21
hazheng 40:be98219930e4 22 void ardu_cam_set_mode(uint8_t mode);
hazheng 40:be98219930e4 23
hazheng 40:be98219930e4 24 void ardu_utft_clr_scr();
hazheng 40:be98219930e4 25
hazheng 40:be98219930e4 26 void ardu_utft_set_xy(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2);
hazheng 40:be98219930e4 27
hazheng 40:be98219930e4 28 void ardu_utft_reset_xy();
hazheng 40:be98219930e4 29
hazheng 40:be98219930e4 30 void ardu_utft_set_color(uint8_t r, uint8_t g, uint8_t b);
hazheng 40:be98219930e4 31
hazheng 40:be98219930e4 32 void ardu_utft_draw_rect(int x1, int y1, int x2, int y2);
hazheng 40:be98219930e4 33
hazheng 40:be98219930e4 34 void ardu_utft_draw_hline(int x, int y, int l);
hazheng 40:be98219930e4 35
hazheng 40:be98219930e4 36 void ardu_utft_draw_vline(int x, int y, int l);
hazheng 40:be98219930e4 37
hazheng 40:be98219930e4 38
hazheng 40:be98219930e4 39 #endif //ARDU_UTFT_H