//-------------------------------------------------------------------------- // // This module implements platform specific code. // //-------------------------------------------------------------------------- // $Archive: /WirelessUSB/WUSB Kits/CY4632 LS KBM RDK/DocSrc/CD_Root/Firmware/Source Code/RDK Mouse/pdc9166.h $ // $Modtime: 6/16/04 4:38p10/01/04 1:18p $ // $Revision: 910 $ //-------------------------------------------------------------------------- // // Copyright 2003-2004, Cypress Semiconductor Corporation. // // This software is owned by Cypress Semiconductor Corporation (Cypress) // and is protected by and subject to worldwide patent protection (United // States and foreign), United States copyright laws and international // treaty provisions. Cypress hereby grants to licensee a personal, // non-exclusive, non-transferable license to copy, use, modify, create // derivative works of, and compile the Cypress Source Code and derivative // works for the sole purpose of creating custom software in support of // licensee product to be used only in conjunction with a Cypress integrated // circuit as specified in the applicable agreement. Any reproduction, // modification, translation, compilation, or representation of this // software except as specified above is prohibited without the express // written permission of Cypress. // // Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND,EXPRESS OR IMPLIED, // WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // Cypress reserves the right to make changes without further notice to the // materials described herein. Cypress does not assume any liability arising // out of the application or use of any product or circuit described herein. // Cypress does not authorize its products for use as critical components in // life-support systems where a malfunction or failure may reasonably be // expected to result in significant injury to the user. The inclusion of // Cypress’ product in a life-support systems application implies that the // manufacturer assumes all risk of such use and in doing so indemnifies // Cypress against all charges. // // Use may be limited by and subject to the applicable Cypress software // license agreement. // //-------------------------------------------------------------------------- #ifndef PDC9166_H #define PDC9166_H //-------------------------------------- // Included files //-------------------------------------- #include "globalparams.h" #include "psocgpioint.h" #include "cypdef.h" //-------------------------------------- // API Definitions and Types //-------------------------------------- // Port definitions #define PORT0 0 #define PORT1 1 #define PORT2 2 #define PORT3 3 #define PORT4 4 #define PORT5 5 // Port bit definitions #define PORT_BIT0 0x01 #define PORT_BIT1 0x02 #define PORT_BIT2 0x04 #define PORT_BIT3 0x08 #define PORT_BIT4 0x10 #define PORT_BIT5 0x20 #define PORT_BIT6 0x40 #define PORT_BIT7 0x80 // Platform definitions #define MOUSE_ZWHEEL_PORT PRT0DR #define MOUSE_ZWHEEL_IE_PORT PORT0 #define MOUSE_ZWHEEL_DRV_PORT PORT0 #define MOUSE_ZWHEEL_1 PORT_BIT3 #define MOUSE_ZWHEEL_2 PORT_BIT4 #define MOUSE_BUTTON_PORT PRT0DR #define MOUSE_BUTTON_IE_PORT PORT0 #define MOUSE_BUTTON_DRV_PORT PORT0 #define MOUSE_BUTTON_LEFT PORT_BIT0 #define MOUSE_BUTTON_RIGHT PORT_BIT1 #define MOUSE_BUTTON_MIDDLE PORT_BIT2 #define MOUSE_OPTICAL_PORT PRT2DR #define MOUSE_OPTICAL_PD PORT_BIT0 #define MOUSE_OPTICAL_SDIO PORT_BIT1 #define MOUSE_OPTICAL_SCLK PORT_BIT2 #define MOUSE_OPTICAL_DM0 PRT2DM0 #define MOUSE_OPTICAL_DM1 PRT2DM1 #define MOUSE_OPTICAL_DM0_INIT PORT_2_DRIVE_0 #define MOUSE_OPTICAL_DM1_INIT PORT_2_DRIVE_1 #define MOUSE_RADIO_IE_PORT PORT1 #define MOUSE_MOTION_IE_PORT PORT2 #define MOUSE_MOTION_PORT PRT2DR #define MOUSE_MOTION_SW PORT_BIT3 #define MOUSE_BIND_IE_PORT PORT0 #define MOUSE_BIND_DRV_PORT PORT0 #define MOUSE_BIND_PORT PRT0DR #define MOUSE_BUTTON_BIND PORT_BIT7 #define MOUSE_BATT_IE_PORT PORT2 #define BATT_LEV_PORT PRT2DR #define BATT_LEV_DM0 PRT2DM0 #define BATT_LEV_DM1 PRT2DM1 #define BATT_LEV_PRT_DRV0 PORT_2_DRIVE_0 #define BATT_LEV_PRT_DRV1 PORT_2_DRIVE_1 // GPIO ISR definitions (see PSoCGPIO.H) #define GPIO_ISR_RADIO_IE_PORT PRT1IE #define GPIO_ISR_RADIO_INT R_IRQ_MASK #define GPIO_ISR_MOTION_IE_PORT PRT2IE #define GPIO_ISR_MOTION_INT Motion_MASK #define GPIO_ISR_BIND_IE_PORT PRT0IE #define GPIO_ISR_BIND_INT Bind_SW_MASK #define GPIO_ISR_BATT_IE_PORT PRT2IE #define GPIO_ISR_BATT_INT BATT_LEV1_MASK #define GPIO_ISR_ZWHEEL_IE_PORT PRT0IE #define GPIO_ISR_ZWHEEL_INT ( ZWheel1_MASK | ZWheel2_MASK ) #define GPIO_ISR_BUTTON_IE_PORT PRT0IE #define GPIO_ISR_BUTTON_INT ( LF_SW_MASK | MID_SW_MASK | RT_SW_MASK ) // Radio Port #define RADIO_PORT PRT1DR #define nPD R_nPD_MASK #define nSS R_nSS_MASK #define nRESET R_nReset_MASK #define nIRQ R_IRQ_MASK #define MISO_MASK R_MISO_MASK //-------------------------------------- // API Function Declarations //-------------------------------------- #endif // PDC9166_H