touchpad init takes different drivers
This commit is contained in:
parent
ef1197baf1
commit
af394c2ba2
2 changed files with 4 additions and 4 deletions
|
@ -12,8 +12,8 @@ static const SPIConfig spicfg = {
|
||||||
SPI_CR1_SPE | SPI_CR1_BR_2 | SPI_CR1_BR_1 | SPI_CR1_BR_0,
|
SPI_CR1_SPE | SPI_CR1_BR_2 | SPI_CR1_BR_1 | SPI_CR1_BR_0,
|
||||||
};
|
};
|
||||||
|
|
||||||
void tpInit(void) {
|
void tpInit(SPIDriver *spip) {
|
||||||
spiStart(&SPID1, &spicfg);
|
spiStart(spip, &spicfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline uint16_t readX(void) {
|
static __inline uint16_t readX(void) {
|
||||||
|
|
|
@ -19,11 +19,11 @@ volatile struct cal {
|
||||||
/*
|
/*
|
||||||
* Description: initializes touchpad (SPI)
|
* Description: initializes touchpad (SPI)
|
||||||
*
|
*
|
||||||
* param: none
|
* param: SPI driver
|
||||||
*
|
*
|
||||||
* return: none
|
* return: none
|
||||||
*/
|
*/
|
||||||
void tpInit(void);
|
void tpInit(SPIDriver *spip);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Description: reads out PEN_IRQ from touchpad controller
|
* Description: reads out PEN_IRQ from touchpad controller
|
||||||
|
|
Loading…
Add table
Reference in a new issue