A library with drivers for different peripherals on the LPC4088 QuickStart Board or related add-on boards.
Dependents: LPC4088test LPC4088test_ledonly LPC4088test_deleteall LPC4088_RAMtest ... more
AR1021 Class Reference
Microchip Touch Screen Controller (AR1021). More...
#include <AR1021.h>
Inherits TouchPanel.
Public Member Functions | |
AR1021 (PinName mosi, PinName miso, PinName sck, PinName cs, PinName siq) | |
Constructor. | |
virtual bool | init (uint16_t width, uint16_t height) |
Initialize the touch controller. | |
virtual bool | read (touchCoordinate_t &coord) |
Read coordinates from the touch panel. | |
virtual bool | calibrateStart () |
Start to calibrate the display. | |
virtual bool | getNextCalibratePoint (uint16_t *x, uint16_t *y) |
Get the next calibration point. | |
virtual bool | waitForCalibratePoint (bool *morePoints, uint32_t timeout) |
Wait for a calibration point to have been pressed and recored. |
Detailed Description
Microchip Touch Screen Controller (AR1021).
Please note that this touch panel has an on-board storage for calibration data. Once a successful calibration has been performed it is not needed to do additional calibrations since the stored calibration data will be used.
Definition at line 30 of file AR1021.h.
Constructor & Destructor Documentation
AR1021 | ( | PinName | mosi, |
PinName | miso, | ||
PinName | sck, | ||
PinName | cs, | ||
PinName | siq | ||
) |
Constructor.
- Parameters:
-
mosi SPI MOSI pin miso SPI MISO pin sck SPI SCK pin cs chip-select pin siq interrupt pin
Definition at line 76 of file AR1021.cpp.
Member Function Documentation
bool calibrateStart | ( | ) | [virtual] |
Start to calibrate the display.
- Returns:
- true if the request was successful; otherwise false
Implements TouchPanel.
Definition at line 184 of file AR1021.cpp.
bool getNextCalibratePoint | ( | uint16_t * | x, |
uint16_t * | y | ||
) | [virtual] |
Get the next calibration point.
Draw an indicator on the screen at the coordinates and ask the user to press/click on the indicator. Please note that waitForCalibratePoint() must be called after this method.
- Parameters:
-
x the x coordinate is written to this argument y the y coordinate is written to this argument
- Returns:
- true if the request was successful; otherwise false
Implements TouchPanel.
Definition at line 244 of file AR1021.cpp.
bool init | ( | uint16_t | width, |
uint16_t | height | ||
) | [virtual] |
Initialize the touch controller.
This method must be called before calibrating or reading data from the controller
- Parameters:
-
width the width of the touch panel. This is usually the same as the width of the display height the height of the touch panel. This is usually the same as the height of the display.
- Returns:
- true if the request was successful; otherwise false
Implements TouchPanel.
Definition at line 111 of file AR1021.cpp.
bool read | ( | touchCoordinate_t & | coord ) | [virtual] |
Read coordinates from the touch panel.
- Parameters:
-
coord pointer to coordinate object. The read coordinates will be written to this object.
Implements TouchPanel.
Definition at line 99 of file AR1021.cpp.
bool waitForCalibratePoint | ( | bool * | morePoints, |
uint32_t | timeout | ||
) | [virtual] |
Wait for a calibration point to have been pressed and recored.
This method must be called just after getNextCalibratePoint().
- Parameters:
-
morePoints true is written to this argument if there are more calibrations points available; otherwise it will be false timeout maximum number of milliseconds to wait for a calibration point. Set this argument to 0 to wait indefinite.
- Returns:
- true if the request was successful; otherwise false
Implements TouchPanel.
Definition at line 276 of file AR1021.cpp.
Generated on Fri Jul 15 2022 02:16:08 by 1.7.2