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
Diff: Hardwares/ArduUTFT.cpp
- Revision:
- 46:a5eb9bd3bb55
- Parent:
- 44:15de535c4005
- Child:
- 54:f1f5648dfacf
--- a/Hardwares/ArduUTFT.cpp Thu Mar 30 03:50:23 2017 +0000 +++ b/Hardwares/ArduUTFT.cpp Thu Mar 30 22:34:20 2017 +0000 @@ -12,22 +12,24 @@ #define swap(type, i, j) {type t = i; i = j; j = t;} -namespace -{ - uint8_t * current_font = NULL; - uint8_t font_x_size = 0; - uint8_t font_y_size = 0; - uint8_t font_offset = 0; - uint8_t font_numchars = 0; - - uint8_t front_color_high = 0; - uint8_t front_color_low = 0; - -} +#ifdef __cplusplus +extern "C" { +#endif + -DigitalOut utft_cs(PIN_AUC_CS, 1); -DigitalOut utft_sd_cs(PIN_AUC_SD_CS, 1); -DigitalOut utft_touch_cs(PIN_AUC_TOUCH_CS, 1); +static uint8_t * current_font = NULL; +static uint8_t font_x_size = 0; +static uint8_t font_y_size = 0; +static uint8_t font_offset = 0; +//static uint8_t font_numchars = 0; + +static uint8_t front_color_high = 0; +static uint8_t front_color_low = 0; + + +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) { @@ -290,7 +292,7 @@ font_x_size = font[0]; font_y_size = font[1]; font_offset = font[2]; - font_numchars = font[3]; + //font_numchars = font[3]; } void ardu_utft_print_char(char c, int x, int y) @@ -332,4 +334,8 @@ for (i = 0; i < stl; ++i) ardu_utft_print_char(*st++, x - (i * (font_x_size)), y); -} \ No newline at end of file +} + +#ifdef __cplusplus +} +#endif \ No newline at end of file