brw1

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers RA8875_Regs.h Source File

RA8875_Regs.h

00001 //
00002 // RA8875 Display Controller Register Definitions.
00003 //
00004 //
00005 #ifndef RA8875_REGS_H
00006 #define RA8875_REGS_H
00007 
00008     // Touch Panel public macros
00009     
00010     /* Touch Panel Enable/Disable Reg TPCR0[7] */
00011     #define TP_ENABLE   ((uint8_t)(1<<7))
00012     #define TP_DISABLE  ((uint8_t)(0<<7))
00013     
00014     /* Touch Panel operating mode Reg TPCR1[6] */
00015     #define TP_MODE_AUTO    ((uint8_t)(0<<6))   
00016     #define TP_MODE_MANUAL  ((uint8_t)(1<<6))
00017     
00018     /* Touch Panel debounce Reg TPCR1[2]    */
00019     #define TP_DEBOUNCE_OFF ((uint8_t)(0<<2))
00020     #define TP_DEBOUNCE_ON  ((uint8_t)(1<<2))
00021     
00022     /* Touch Panel manual modes Reg TPCR1[1:0]  */
00023     #define TP_MANUAL_IDLE      0
00024     #define TP_MANUAL_WAIT      1
00025     #define TP_MANUAL_LATCH_X   2
00026     #define TP_MANUAL_LATCH_Y   3
00027     
00028     /* Touch Panel ADC Clock modes Reg TPCR0[2:0] */
00029     #define TP_ADC_CLKDIV_1            0
00030     #define TP_ADC_CLKDIV_2            1        
00031     #define TP_ADC_CLKDIV_4            2        
00032     #define TP_ADC_CLKDIV_8            3      
00033     #define TP_ADC_CLKDIV_16           4        
00034     #define TP_ADC_CLKDIV_32           5        
00035     #define TP_ADC_CLKDIV_64           6        
00036     #define TP_ADC_CLKDIV_128          7
00037             
00038     
00039     /* Touch Panel Sample Time Reg TPCR0[6:4] */
00040     #define TP_ADC_SAMPLE_512_CLKS     ((uint8_t)(0<<4))
00041     #define TP_ADC_SAMPLE_1024_CLKS    ((uint8_t)(1<<4))
00042     #define TP_ADC_SAMPLE_2048_CLKS    ((uint8_t)(2<<4))
00043     #define TP_ADC_SAMPLE_4096_CLKS    ((uint8_t)(3<<4))
00044     #define TP_ADC_SAMPLE_8192_CLKS    ((uint8_t)(4<<4))
00045     #define TP_ADC_SAMPLE_16384_CLKS   ((uint8_t)(5<<4))
00046     #define TP_ADC_SAMPLE_32768_CLKS   ((uint8_t)(6<<4))
00047     #define TP_ADC_SAMPLE_65536_CLKS   ((uint8_t)(7<<4))
00048     
00049     /* RA8875 interrupt enable/flag/clear masks */
00050     #define RA8875_INT_KEYSCAN          ((uint8_t)(1<<4))    /**< KEYSCAN interrupts  */
00051     #define RA8875_INT_DMA              ((uint8_t)(1<<3))    /**< DMA interrupts  */
00052     #define RA8875_INT_TP               ((uint8_t)(1<<2))    /**< Touch panel interrupts  */
00053     #define RA8875_INT_BTE              ((uint8_t)(1<<1))    /**< BTE process complete interrupts  */
00054     #define RA8875_INT_BTEMCU_FONTWR    ((uint8_t)(1<<0))    /**< BTE-MCU-R/W or Font-Write interrupts  */
00055 
00056 #endif // RA8875_REGS_H