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

Hardwares/ArduUTFT.h

Committer:
hazheng
Date:
2017-03-23
Revision:
41:7b21c5e3599e
Parent:
40:be98219930e4
Child:
42:c4e1606087ff

File content as of revision 41:7b21c5e3599e:

#pragma once
#ifndef ARDU_UTFT_H
#define ARDU_UTFT_H

#include <mbed.h>
#include "PinAssignment.h"

#define ARDUCHIP_MODE           0x02  //Mode register
//#define MCU2LCD_MODE            0x00
//#define CAM2LCD_MODE            0x01
#define MCU2LCD_MODE            0x01
#define CAM2LCD_MODE            0x02
//#define LCD2MCU_MODE            0x04

#define ARDUCHIP_TEST1_UTFT          0x00  //TEST register
#define ARDUCHIP_TEST_MSG_UTFT       0x72

#define ARDUCHIP_VER_NUM_UTFT        0x61
    
void ardu_utft_init(); //We only use LANDSCAPE orientation!

void ardu_cam_set_mode(uint8_t mode);

void ardu_utft_write_DATA(uint8_t VH, uint8_t VL);

void ardu_utft_clr_scr();

void ardu_utft_set_xy(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2);

void ardu_utft_reset_xy();

void ardu_utft_set_color(uint8_t r, uint8_t g, uint8_t b);

void ardu_utft_draw_rect(int x1, int y1, int x2, int y2);

void ardu_utft_draw_hline(int x, int y, int l);

void ardu_utft_draw_vline(int x, int y, int l);


#endif //ARDU_UTFT_H