The wait in mci_WaitForEvent will delay all card transactions.

Dependencies:   FATFileSystem

Fork of EALib by EmbeddedArtists AB

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers TouchPanel.h Source File

TouchPanel.h

00001 
00002 #ifndef TOUCHPANEL_H
00003 #define TOUCHPANEL_H
00004 
00005 
00006 /**
00007  * An abstract class that represents touch panels.
00008  */
00009 class TouchPanel {
00010 public:
00011 
00012     typedef struct {
00013         int32_t x;
00014         int32_t y;
00015         int32_t z;
00016     } touchCoordinate_t;
00017 
00018 
00019     /**
00020      * Initialize the touch controller. This method must be called before
00021      * calibrating or reading data from the controller
00022      *
00023      * @param width the width of the touch panel. This is usually the same as
00024      * the width of the display
00025      * @param height the height of the touch panel. This is usually the same
00026      * as the height of the display.
00027      *
00028      * @return true if the request was successful; otherwise false
00029      */
00030     virtual bool init(uint16_t width, uint16_t height) = 0;
00031 
00032     /**
00033      * Read coordinates from the touch panel.
00034      *
00035      * @param coord pointer to coordinate object. The read coordinates will be
00036      * written to this object.
00037      */
00038     virtual bool read(touchCoordinate_t &coord) = 0;
00039 
00040 
00041     /**
00042      * Start to calibrate the display
00043      *
00044      * @return true if the request was successful; otherwise false
00045      */
00046     virtual bool calibrateStart() = 0;
00047 
00048     /**
00049      * Get the next calibration point. Draw an indicator on the screen
00050      * at the coordinates and ask the user to press/click on the indicator.
00051      * Please note that waitForCalibratePoint() must be called after this
00052      * method.
00053      *
00054      * @param x the x coordinate is written to this argument
00055      * @param y the y coordinate is written to this argument
00056      *
00057      * @return true if the request was successful; otherwise false
00058      */
00059     virtual bool getNextCalibratePoint(uint16_t* x, uint16_t* y) = 0;
00060 
00061     /**
00062      * Wait for a calibration point to have been pressed and recored.
00063      * This method must be called just after getNextCalibratePoint().
00064      *
00065      * @param morePoints true is written to this argument if there
00066      * are more calibrations points available; otherwise it will be false
00067      * @param timeout maximum number of milliseconds to wait for
00068      * a calibration point. Set this argument to 0 to wait indefinite.
00069      *
00070      * @return true if the request was successful; otherwise false
00071      */
00072     virtual bool waitForCalibratePoint(bool* morePoints, uint32_t timeout) = 0;
00073 
00074 
00075 };
00076 
00077 #endif