2013-05-03 14:36:17 +00:00
|
|
|
/*
|
|
|
|
* This file is subject to the terms of the GFX License, v1.0. If a copy of
|
|
|
|
* the license was not distributed with this file, you can obtain one at:
|
|
|
|
*
|
|
|
|
* http://chibios-gfx.com/license.html
|
|
|
|
*/
|
2013-03-07 23:56:59 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @file drivers/ginput/touch/STMPE811/ginput_lld_mouse_board_example.h
|
|
|
|
* @brief GINPUT Touch low level driver source for the STMPE811 on the example board.
|
|
|
|
*
|
|
|
|
* @defgroup Mouse Mouse
|
|
|
|
* @ingroup GINPUT
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _GINPUT_LLD_MOUSE_BOARD_H
|
|
|
|
#define _GINPUT_LLD_MOUSE_BOARD_H
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Initialise the board for the touch.
|
|
|
|
*
|
|
|
|
* @notapi
|
|
|
|
*/
|
2013-03-25 00:10:32 +00:00
|
|
|
static void init_board(void)
|
|
|
|
{
|
2013-03-07 23:56:59 +00:00
|
|
|
/* Code here */
|
|
|
|
#error "ginputSTMPE811: You must supply a definition for init_board for your board"
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2013-03-25 00:10:32 +00:00
|
|
|
* @brief Check whether an interrupt is raised
|
|
|
|
* @return TRUE if there is an interrupt signal present
|
2013-03-07 23:56:59 +00:00
|
|
|
*
|
|
|
|
* @notapi
|
|
|
|
*/
|
2013-03-29 17:17:24 +00:00
|
|
|
static inline bool_t getpin_irq(void)
|
2013-03-25 00:10:32 +00:00
|
|
|
{
|
2013-03-07 23:56:59 +00:00
|
|
|
/* Code here */
|
2013-03-29 17:17:24 +00:00
|
|
|
#error "ginputSTMPE811: You must supply a definition for getpin_irq for your board"
|
2013-03-07 23:56:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2013-03-25 00:10:32 +00:00
|
|
|
* @brief Write a value into a certain register
|
2013-03-07 23:56:59 +00:00
|
|
|
*
|
2013-03-25 00:10:32 +00:00
|
|
|
* @param[in] reg The register address
|
|
|
|
* @param[in] n The amount of bytes (one or two)
|
|
|
|
* @param[in] val The value
|
2013-03-07 23:56:59 +00:00
|
|
|
*
|
|
|
|
* @notapi
|
|
|
|
*/
|
2013-03-25 00:10:32 +00:00
|
|
|
static void write_reg(uint8_t reg, uint8_t n, uint16_t val)
|
|
|
|
{
|
2013-03-07 23:56:59 +00:00
|
|
|
/* Code here */
|
2013-03-25 00:10:32 +00:00
|
|
|
#error "ginputSTMPE811: You must supply a definition for write_reg for your board"
|
2013-03-07 23:56:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2013-03-25 00:10:32 +00:00
|
|
|
* @brief Read the value of a certain register
|
|
|
|
*
|
|
|
|
* @param[in] reg The register address
|
|
|
|
* @param[in] n The amount of bytes (one or two)
|
2013-03-07 23:56:59 +00:00
|
|
|
*
|
2013-03-25 00:10:32 +00:00
|
|
|
* @return Data read from device (one byte or two depending on n param)
|
2013-03-07 23:56:59 +00:00
|
|
|
*
|
|
|
|
* @notapi
|
|
|
|
*/
|
2013-03-25 00:10:32 +00:00
|
|
|
static uint16_t read_reg(uint8_t reg, uint8_t n)
|
|
|
|
{
|
2013-03-07 23:56:59 +00:00
|
|
|
/* Code here */
|
2013-03-25 00:10:32 +00:00
|
|
|
#error "ginputSTMPE811: You must supply a definition for read_reg for your board"
|
2013-03-07 23:56:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* _GINPUT_LLD_MOUSE_BOARD_H */
|
|
|
|
/** @} */
|