This is the David Smart RA8875 Library with mods for working with FRDM-K64F
Diff: RA8875.h
- Revision:
- 166:53fd4a876dac
- Parent:
- 165:695c24cc5197
- Child:
- 167:8aa3fb2a5a31
--- a/RA8875.h Sun Feb 24 00:40:00 2019 +0000 +++ b/RA8875.h Sun Feb 24 19:28:26 2019 +0000 @@ -767,25 +767,24 @@ /// It is possible to query the data for a channel that is not /// presently reported as touched. /// - /// @param[in] channel is the touch channel, from 0 to 4, or 0 to getTouchCount()-1 + /// @param[in] channel is the touch channel, from 0 to 4, or 0 to TouchChannels()-1 /// It defaults to 0, in case the user is not interested in multi-touch. /// @returns the touch ID, or 15 if you get the ID for an untouched channel. /// @returns 0 if an invalid channel is queried. /// - uint8_t TouchID(uint8_t channel = 0) { return (channel < 5) ? touchInfo[channel].touchID : touchInfo[0].touchID; } - + uint8_t TouchID(uint8_t channel = 0); /// Get the Touch Code for a touch channel. /// /// It is possible to query the data for a channel that is not /// presently reported as touched. /// - /// @param[in] channel is the touch channel, from 0 to 4, or 0 to getTouchCount()-1 + /// @param[in] channel is the touch channel, from 0 to 4, or 0 to TouchChannels()-1 /// It defaults to 0, in case the user is not interested in multi-touch. /// @returns the touch code (@ref TouchCode_t). /// @returns channel 0 information if an invalid channel is queried. /// - TouchCode_t TouchCode(uint8_t channel = 0) { return (channel < 5) ? touchInfo[channel].touchCode : touchInfo[0].touchCode; } + TouchCode_t TouchCode(uint8_t channel = 0); /// Get the coordinates for a touch channel. @@ -796,13 +795,13 @@ /// It is possible to query the data for a channel that is not /// presently reported as touched. /// - /// @param[in] channel is an optional touch channel, from 0 to 4, or 0 to getTouchCount()-1. + /// @param[in] channel is an optional touch channel, from 0 to 4, or 0 to TouchChannels()-1. /// It defaults to 0, in case the user is not interested in multi-touch. /// @returns the coordinates as a point_t structure. /// @returns channel 0 information if an invalid channel is queried. /// - point_t TouchCoordinates(uint8_t channel = 0) { return (channel < 5) ? touchInfo[channel].coordinates : touchInfo[0].coordinates; } - + point_t TouchCoordinates(uint8_t channel = 0); + /// Poll the TouchPanel and on a touch event return the a to d filtered x, y coordinates. /// @@ -2798,10 +2797,9 @@ uint8_t touchID; ///< Contains the touch ID, which is the "order" of touch, from 0 to n-1 TouchCode_t touchCode; ///< Contains the touch code; no_touch, touch, held, release point_t coordinates; ///< Contains the X,Y coordinate of the touch - } touchInfo_T; - touchInfo_T touchInfo[10]; /// Contains the actual touch information in an array from 0 to n-1 + touchInfo_T * touchInfo; /// Storage allocated by the constructor to contains the touch information #if MBED_VERSION >= MBED_ENCODE_VERSION(5,8,0) Thread eventThread;