Exemple #1
0
 * The order of Y - Line numbering follows from the way the
 * Y-Lines are filled as below
 * Here, Y0,Y1,Y2,Y3 on 0,1,2,3
 * Note: 1. The Number entries should be based on NUM_X_LINES
 *          2 entries when NUM_Y_LINES=2
 *          4 entries when NUM_Y_LINES=4
 *          8 entries when NUM_Y_LINES=8
*/
y_line_info_t ya_line_info[NUM_Y_LINES]= {
    FILL_OUT_YA_LINE_INFO(  0u ),
    FILL_OUT_YA_LINE_INFO(  1u ),
    FILL_OUT_YA_LINE_INFO(  2u ),
    FILL_OUT_YA_LINE_INFO(  3u ),
};
y_line_info_t yb_line_info[NUM_Y_LINES]= {
    FILL_OUT_YB_LINE_INFO(  0u ),
    FILL_OUT_YB_LINE_INFO(  1u ),
    FILL_OUT_YB_LINE_INFO(  2u ),
    FILL_OUT_YB_LINE_INFO(  3u ),
};
#endif/*_QMATRIX_*/

/*----------------------------------------------------------------------------
                                static variables
----------------------------------------------------------------------------*/

/* flag set by timer ISR when it's time to measure touch */
static volatile uint8_t time_to_measure_touch = 0u;

/* current time, set by timer ISR */
static volatile uint16_t current_time_ms_touch = 0u;
   #endif
/* Fill out the Y-Line masks on the Y- Line port selected
 * The order of Y - Line numbering follows from the way the
 * Y-Lines are filled as below
 * Here, Y0,Y1,Y2,Y3 on 0,1,2,3
 * Note: 1. The Number entries should be based on NUM_X_LINES
 *          2 entries when NUM_Y_LINES=2
 *          4 entries when NUM_Y_LINES=4
 *          8 entries when NUM_Y_LINES=8
*/
   #if (NUM_Y_LINES==1u)
      y_line_info_t ya_line_info[NUM_Y_LINES]= {
         FILL_OUT_YA_LINE_INFO(  0u )
      };
	  y_line_info_t yb_line_info[NUM_Y_LINES]= {
         FILL_OUT_YB_LINE_INFO(  0u )
      };
   #endif
   #if (NUM_Y_LINES==2u)
      y_line_info_t ya_line_info[NUM_Y_LINES]= {
         FILL_OUT_YA_LINE_INFO(  0u ),
         FILL_OUT_YA_LINE_INFO(  1u )
      };
	  y_line_info_t yb_line_info[NUM_Y_LINES]= {
         FILL_OUT_YB_LINE_INFO(  0u ),
         FILL_OUT_YB_LINE_INFO(  1u )
      };
   #endif
   #if (NUM_Y_LINES==4u)
      y_line_info_t ya_line_info[NUM_Y_LINES]= {
         FILL_OUT_YA_LINE_INFO(  0u ),
Exemple #3
0
FILL_OUT_X_LINE_INFO(1,2),
FILL_OUT_X_LINE_INFO(1,3),
FILL_OUT_X_LINE_INFO(1,4),
FILL_OUT_X_LINE_INFO(1,5),
FILL_OUT_X_LINE_INFO(1,6),
FILL_OUT_X_LINE_INFO(1,7)};

y_line_info_t ya_line_info[NUM_Y_LINES]={
FILL_OUT_YA_LINE_INFO(3),
FILL_OUT_YA_LINE_INFO(2),
FILL_OUT_YA_LINE_INFO(1),
FILL_OUT_YA_LINE_INFO(0),
};

y_line_info_t yb_line_info[NUM_Y_LINES]={
FILL_OUT_YB_LINE_INFO(3),
FILL_OUT_YB_LINE_INFO(2),
FILL_OUT_YB_LINE_INFO(1),
FILL_OUT_YB_LINE_INFO(0),
};


#endif/*_QMATRIX_*/

extern uint8_t time_to_measure_touch;
extern uint16_t current_time_ms_touch;


/*----------------------------------------------------------------------------
                                static variables
----------------------------------------------------------------------------*/
Exemple #4
0
/* Fill out the X-Line masks and  Y-Line masks on the X- Port and Y-Line Port selected.
* The order of X - Line numbering follows from the way the
*
*/


x_line_info_t x_line_info[NUM_X_LINES]= {
FILL_OUT_X_LINE_INFO(1,2),
};

y_line_info_t ya_line_info[NUM_Y_LINES]={
FILL_OUT_YA_LINE_INFO(2),
};

y_line_info_t yb_line_info[NUM_Y_LINES]={
FILL_OUT_YB_LINE_INFO(0),
};


#endif/*_QMATRIX_*/

extern uint8_t time_to_measure_touch;
extern uint16_t current_time_ms_touch;


/*----------------------------------------------------------------------------
                                static variables
----------------------------------------------------------------------------*/

/*============================================================================
Name    :   touch_init