| Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
AN3245 Datasheet(PDF) 14 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3245 Datasheet(HTML) 14 Page - STMicroelectronics |
|
14 / 19 page ![]() Software AN3245 14/19 Doc ID 17747 Rev 1 //Set scan count, no dedicated keys WriteRegister(INT_EN_MASK_LOW,0x06); //Enable KPC FIFO overflow and KPC Interrupt ReadRegister(INT_STA_LOW); //Clear Interrupt Status register WriteRegister(INT_CTRL_LOW,0x01); //Active Low, Level Interrupt, Enable Global Interrupt ● GPIO initialization (e.g. GPIO low to output, GPIO MID to input) WriteRegister(SYS_CTRL, 0x80);//Issue SW reset WriteRegister(GPIO_SET_DIR_LOW,0xFF); //Set port to OUTPUT WriteRegister(GPIO_SET_DIR_MID,0x00); //Set port to INPUT WriteRegister(GPIO_SET_DIR_HIGH,0x03); //IO 16/17 UNUSED,Set to OUTPUT WriteRegister(INT_EN_MASK_LOW,0x08); //Enable GPIO Interrupt WriteRegister(INT_EN_GPIO_MASK_MID,0xFF); //Enable 8-15 Input Interrupt ReadRegister(INT_STA_GPIO); //Clear all status in GPIO status register ReadRegister (INT_STA_LOW); //Clear Interrupt Status register WriteRegister(INT_CTRL_LOW,0x01); //Active Low, Level Interrupt, Enable Global Interrupt ● Hotkey initialization (e.g. Setting GPIO15 as hotkey) WriteRegister(GPIO_SET_DIR_MSB,0x80); //Set GPIO15 to INPUT WriteRegister(GPIO_SET_RE_MSB,0x80); //Set GPIO15 as RISING EDGE trigger WriteRegister(INT_CTRL,0x01); //Active Low, Level Interrupt, Enable Global Interrupt 2.2.2 Interrupt handling The following is a sample for the device interrupt/hotkey serving routine based on standard implementation. It is necessary to ensure that the host and STMPE1801 interrupt type (active high/low and level/edge detect) are consistent. ● Interrupt service routine ON_INTERRUPT INT_STATUS = ReadRegister(INT_STA_LOW); //Read Interrupt Status register // GPIO Interrupt |
|
|
Enlace URL |
| ¿ALLDATASHEET es útil para Ud.? [ DONATE ] |
Todo acerca de Alldatasheet | Publicidad | Contáctenos | Política de Privacidad | Enlace a la hoja de datos | Intercambio de Enlaces | Lista de Fabricantes All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |