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:
Thu Apr 20 21:04:10 2017 +0000
Revision:
100:ffbeefc9e218
Parent:
93:8e1bd3602d53
Better version of Intersection detection.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hazheng 93:8e1bd3602d53 1 /**
hazheng 93:8e1bd3602d53 2 * @file ArduTouch.h
hazheng 93:8e1bd3602d53 3 * @brief The header file for all functions that controls the ArduCam touch screen.
hazheng 93:8e1bd3602d53 4 * @author Jordan Brack <jabrack@mix.wvu.edu>, Haofan Zheng <hazheng@mix.wvu.edu>
hazheng 93:8e1bd3602d53 5 *
hazheng 93:8e1bd3602d53 6 */
hazheng 78:9f20bf037db6 7 #pragma once
hazheng 78:9f20bf037db6 8 #ifndef ARDU_TOUCH_H
hazheng 78:9f20bf037db6 9 #define ARDU_TOUCH_H
hazheng 78:9f20bf037db6 10
hazheng 79:bdbac82c979b 11 #include <mbed.h>
hazheng 79:bdbac82c979b 12
hazheng 78:9f20bf037db6 13 #ifdef __cplusplus
hazheng 78:9f20bf037db6 14 extern "C" {
hazheng 78:9f20bf037db6 15 #endif
hazheng 78:9f20bf037db6 16
hazheng 93:8e1bd3602d53 17 /**
hazheng 93:8e1bd3602d53 18 * @brief Init the touch screen. There is only one touch screen in the system, thus, this function is required to be called only once during the system initialization.
hazheng 93:8e1bd3602d53 19 */
hazheng 79:bdbac82c979b 20 void ardu_touch_init();
hazheng 78:9f20bf037db6 21
hazheng 93:8e1bd3602d53 22 /**
hazheng 93:8e1bd3602d53 23 * @brief Get the position of the most recent touch.
hazheng 93:8e1bd3602d53 24 * @param x Output. Position in x-axis. A pointer points to the space used to store the value.
hazheng 93:8e1bd3602d53 25 * @param y Output. Position in y-axis. A pointer points to the space used to store the value.
hazheng 93:8e1bd3602d53 26 */
hazheng 79:bdbac82c979b 27 void ardu_touch_get_pos(int16_t* x, int16_t* y);
hazheng 78:9f20bf037db6 28
hazheng 93:8e1bd3602d53 29 /**
hazheng 93:8e1bd3602d53 30 * @brief Set the touch screen interrupt callback function.
hazheng 93:8e1bd3602d53 31 * @param irq_func The pointer to the interrupt callback function.
hazheng 93:8e1bd3602d53 32 */
hazheng 80:c85cb93713b3 33 void ardu_touch_set_irq_function(void(*irq_func)(void));
hazheng 80:c85cb93713b3 34
hazheng 93:8e1bd3602d53 35 /**
hazheng 93:8e1bd3602d53 36 * @brief Set the touch screen touch position callback function.
hazheng 93:8e1bd3602d53 37 * @param pos_func The pointer to the touch position callback function.
hazheng 93:8e1bd3602d53 38 */
hazheng 80:c85cb93713b3 39 void ardu_touch_set_pos_function(void(*pos_func)(int16_t, int16_t));
hazheng 80:c85cb93713b3 40
hazheng 78:9f20bf037db6 41 #ifdef __cplusplus
hazheng 78:9f20bf037db6 42 }
hazheng 78:9f20bf037db6 43 #endif
hazheng 78:9f20bf037db6 44
hazheng 78:9f20bf037db6 45 #endif //ARDU_TOUCH_H