Library to control a Graphics TFT connected to 4-wire SPI - revised for the Raio RA8875 Display Controller.

Dependents:   FRDM_RA8875_mPaint RA8875_Demo RA8875_KeyPadDemo RA8875_Demo ... more

Fork of SPI_TFT by Peter Drescher

See Components - RA8875 Based Display

Enhanced touch-screen support - where it previous supported both the Resistive Touch and Capacitive Touch based on the FT5206 Touch Controller, now it also has support for the GSL1680 Touch Controller.

Offline Help Manual (Windows chm)

/media/uploads/WiredHome/ra8875.zip.bin (download, rename to .zip and unzip)

Committer:
WiredHome
Date:
Fri Mar 15 01:39:39 2019 +0000
Revision:
175:7be3a1fb7fc2
Parent:
77:9206c13aa527
Child:
176:4ab96d33a8ec
Non-functional change to WriteCommand() based on register names, rather than hex values.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
WiredHome 77:9206c13aa527 1 //
WiredHome 77:9206c13aa527 2 // RA8875 Display Controller Register Definitions.
WiredHome 77:9206c13aa527 3 //
WiredHome 77:9206c13aa527 4 //
WiredHome 77:9206c13aa527 5 #ifndef RA8875_REGS_H
WiredHome 77:9206c13aa527 6 #define RA8875_REGS_H
WiredHome 77:9206c13aa527 7
WiredHome 77:9206c13aa527 8 // Touch Panel public macros
WiredHome 77:9206c13aa527 9
WiredHome 77:9206c13aa527 10 /* Touch Panel Enable/Disable Reg TPCR0[7] */
WiredHome 77:9206c13aa527 11 #define TP_ENABLE ((uint8_t)(1<<7))
WiredHome 77:9206c13aa527 12 #define TP_DISABLE ((uint8_t)(0<<7))
WiredHome 77:9206c13aa527 13
WiredHome 77:9206c13aa527 14 /* Touch Panel operating mode Reg TPCR1[6] */
WiredHome 77:9206c13aa527 15 #define TP_MODE_AUTO ((uint8_t)(0<<6))
WiredHome 77:9206c13aa527 16 #define TP_MODE_MANUAL ((uint8_t)(1<<6))
WiredHome 77:9206c13aa527 17
WiredHome 77:9206c13aa527 18 /* Touch Panel debounce Reg TPCR1[2] */
WiredHome 77:9206c13aa527 19 #define TP_DEBOUNCE_OFF ((uint8_t)(0<<2))
WiredHome 77:9206c13aa527 20 #define TP_DEBOUNCE_ON ((uint8_t)(1<<2))
WiredHome 77:9206c13aa527 21
WiredHome 77:9206c13aa527 22 /* Touch Panel manual modes Reg TPCR1[1:0] */
WiredHome 77:9206c13aa527 23 #define TP_MANUAL_IDLE 0
WiredHome 77:9206c13aa527 24 #define TP_MANUAL_WAIT 1
WiredHome 77:9206c13aa527 25 #define TP_MANUAL_LATCH_X 2
WiredHome 77:9206c13aa527 26 #define TP_MANUAL_LATCH_Y 3
WiredHome 77:9206c13aa527 27
WiredHome 77:9206c13aa527 28 /* Touch Panel ADC Clock modes Reg TPCR0[2:0] */
WiredHome 77:9206c13aa527 29 #define TP_ADC_CLKDIV_1 0
WiredHome 77:9206c13aa527 30 #define TP_ADC_CLKDIV_2 1
WiredHome 77:9206c13aa527 31 #define TP_ADC_CLKDIV_4 2
WiredHome 77:9206c13aa527 32 #define TP_ADC_CLKDIV_8 3
WiredHome 77:9206c13aa527 33 #define TP_ADC_CLKDIV_16 4
WiredHome 77:9206c13aa527 34 #define TP_ADC_CLKDIV_32 5
WiredHome 77:9206c13aa527 35 #define TP_ADC_CLKDIV_64 6
WiredHome 77:9206c13aa527 36 #define TP_ADC_CLKDIV_128 7
WiredHome 77:9206c13aa527 37
WiredHome 77:9206c13aa527 38
WiredHome 77:9206c13aa527 39 /* Touch Panel Sample Time Reg TPCR0[6:4] */
WiredHome 77:9206c13aa527 40 #define TP_ADC_SAMPLE_512_CLKS ((uint8_t)(0<<4))
WiredHome 77:9206c13aa527 41 #define TP_ADC_SAMPLE_1024_CLKS ((uint8_t)(1<<4))
WiredHome 77:9206c13aa527 42 #define TP_ADC_SAMPLE_2048_CLKS ((uint8_t)(2<<4))
WiredHome 77:9206c13aa527 43 #define TP_ADC_SAMPLE_4096_CLKS ((uint8_t)(3<<4))
WiredHome 77:9206c13aa527 44 #define TP_ADC_SAMPLE_8192_CLKS ((uint8_t)(4<<4))
WiredHome 77:9206c13aa527 45 #define TP_ADC_SAMPLE_16384_CLKS ((uint8_t)(5<<4))
WiredHome 77:9206c13aa527 46 #define TP_ADC_SAMPLE_32768_CLKS ((uint8_t)(6<<4))
WiredHome 77:9206c13aa527 47 #define TP_ADC_SAMPLE_65536_CLKS ((uint8_t)(7<<4))
WiredHome 77:9206c13aa527 48
WiredHome 77:9206c13aa527 49 /* RA8875 interrupt enable/flag/clear masks */
WiredHome 77:9206c13aa527 50 #define RA8875_INT_KEYSCAN ((uint8_t)(1<<4)) /**< KEYSCAN interrupts */
WiredHome 77:9206c13aa527 51 #define RA8875_INT_DMA ((uint8_t)(1<<3)) /**< DMA interrupts */
WiredHome 77:9206c13aa527 52 #define RA8875_INT_TP ((uint8_t)(1<<2)) /**< Touch panel interrupts */
WiredHome 77:9206c13aa527 53 #define RA8875_INT_BTE ((uint8_t)(1<<1)) /**< BTE process complete interrupts */
WiredHome 77:9206c13aa527 54 #define RA8875_INT_BTEMCU_FONTWR ((uint8_t)(1<<0)) /**< BTE-MCU-R/W or Font-Write interrupts */
WiredHome 77:9206c13aa527 55
WiredHome 175:7be3a1fb7fc2 56
WiredHome 175:7be3a1fb7fc2 57 // RA8875 Register Names and Bit-Values
WiredHome 175:7be3a1fb7fc2 58 //
WiredHome 175:7be3a1fb7fc2 59 // Leveraged from Adafruit library for register names that match
WiredHome 175:7be3a1fb7fc2 60 // the RA8875 PDF documentation.
WiredHome 175:7be3a1fb7fc2 61 //
WiredHome 175:7be3a1fb7fc2 62 // Missing registered that are used herein have been added
WiredHome 175:7be3a1fb7fc2 63
WiredHome 175:7be3a1fb7fc2 64 // Command/Data pins for SPI
WiredHome 175:7be3a1fb7fc2 65 //#define RA8875_DATAWRITE 0x00
WiredHome 175:7be3a1fb7fc2 66 //#define RA8875_DATAREAD 0x40
WiredHome 175:7be3a1fb7fc2 67 //#define RA8875_CMDWRITE 0x80
WiredHome 175:7be3a1fb7fc2 68 //#define RA8875_CMDREAD 0xC0
WiredHome 175:7be3a1fb7fc2 69
WiredHome 175:7be3a1fb7fc2 70 // Registers & bits
WiredHome 175:7be3a1fb7fc2 71 #define RA8875_PWRR 0x01
WiredHome 175:7be3a1fb7fc2 72 #define RA8875_PWRR_DISPON 0x80
WiredHome 175:7be3a1fb7fc2 73 #define RA8875_PWRR_DISPOFF 0x00
WiredHome 175:7be3a1fb7fc2 74 #define RA8875_PWRR_SLEEP 0x02
WiredHome 175:7be3a1fb7fc2 75 #define RA8875_PWRR_NORMAL 0x00
WiredHome 175:7be3a1fb7fc2 76 #define RA8875_PWRR_SOFTRESET 0x01
WiredHome 175:7be3a1fb7fc2 77
WiredHome 175:7be3a1fb7fc2 78 #define RA8875_MRWC 0x02
WiredHome 175:7be3a1fb7fc2 79
WiredHome 175:7be3a1fb7fc2 80 #define RA8875_GPIOX 0xC7
WiredHome 175:7be3a1fb7fc2 81
WiredHome 175:7be3a1fb7fc2 82 #define RA8875_SYSR 0x10
WiredHome 175:7be3a1fb7fc2 83 #define RA8875_SYSR_8BPP 0x00
WiredHome 175:7be3a1fb7fc2 84 #define RA8875_SYSR_16BPP 0x0C
WiredHome 175:7be3a1fb7fc2 85 #define RA8875_SYSR_MCU8 0x00
WiredHome 175:7be3a1fb7fc2 86 #define RA8875_SYSR_MCU16 0x03
WiredHome 175:7be3a1fb7fc2 87
WiredHome 175:7be3a1fb7fc2 88 #define RA8875_PCSR 0x04
WiredHome 175:7be3a1fb7fc2 89 #define RA8875_PCSR_PDATR 0x00
WiredHome 175:7be3a1fb7fc2 90 #define RA8875_PCSR_PDATL 0x80
WiredHome 175:7be3a1fb7fc2 91 #define RA8875_PCSR_CLK 0x00
WiredHome 175:7be3a1fb7fc2 92 #define RA8875_PCSR_2CLK 0x01
WiredHome 175:7be3a1fb7fc2 93 #define RA8875_PCSR_4CLK 0x02
WiredHome 175:7be3a1fb7fc2 94 #define RA8875_PCSR_8CLK 0x03
WiredHome 175:7be3a1fb7fc2 95
WiredHome 175:7be3a1fb7fc2 96 #define RA8875_HDWR 0x14
WiredHome 175:7be3a1fb7fc2 97
WiredHome 175:7be3a1fb7fc2 98 #define RA8875_HNDFTR 0x15
WiredHome 175:7be3a1fb7fc2 99 #define RA8875_HNDFTR_DE_HIGH 0x00
WiredHome 175:7be3a1fb7fc2 100 #define RA8875_HNDFTR_DE_LOW 0x80
WiredHome 175:7be3a1fb7fc2 101
WiredHome 175:7be3a1fb7fc2 102 #define RA8875_HNDR 0x16
WiredHome 175:7be3a1fb7fc2 103 #define RA8875_HSTR 0x17
WiredHome 175:7be3a1fb7fc2 104 #define RA8875_HPWR 0x18
WiredHome 175:7be3a1fb7fc2 105 #define RA8875_HPWR_LOW 0x00
WiredHome 175:7be3a1fb7fc2 106 #define RA8875_HPWR_HIGH 0x80
WiredHome 175:7be3a1fb7fc2 107
WiredHome 175:7be3a1fb7fc2 108 #define RA8875_VDHR0 0x19
WiredHome 175:7be3a1fb7fc2 109 #define RA8875_VDHR1 0x1A
WiredHome 175:7be3a1fb7fc2 110 #define RA8875_VNDR0 0x1B
WiredHome 175:7be3a1fb7fc2 111 #define RA8875_VNDR1 0x1C
WiredHome 175:7be3a1fb7fc2 112 #define RA8875_VSTR0 0x1D
WiredHome 175:7be3a1fb7fc2 113 #define RA8875_VSTR1 0x1E
WiredHome 175:7be3a1fb7fc2 114 #define RA8875_VPWR 0x1F
WiredHome 175:7be3a1fb7fc2 115 #define RA8875_VPWR_LOW 0x00
WiredHome 175:7be3a1fb7fc2 116 #define RA8875_VPWR_HIGH 0x80
WiredHome 175:7be3a1fb7fc2 117
WiredHome 175:7be3a1fb7fc2 118 #define RA8875_DPCR 0x20
WiredHome 175:7be3a1fb7fc2 119 #define RA8875_FNCR0 0x21
WiredHome 175:7be3a1fb7fc2 120 #define RA8875_FNCR1 0x22
WiredHome 175:7be3a1fb7fc2 121 #define RA8875_CGSR 0x23
WiredHome 175:7be3a1fb7fc2 122 #define RA8875_HOFS0 0x24
WiredHome 175:7be3a1fb7fc2 123 #define RA8875_HOFS1 0x25
WiredHome 175:7be3a1fb7fc2 124 #define RA8875_VOFS0 0x26
WiredHome 175:7be3a1fb7fc2 125 #define RA8875_VOFS1 0x27
WiredHome 175:7be3a1fb7fc2 126
WiredHome 175:7be3a1fb7fc2 127 #define RA8875_FLDR 0x29
WiredHome 175:7be3a1fb7fc2 128 #define RA8875_FCURXL 0x2A
WiredHome 175:7be3a1fb7fc2 129 #define RA8875_FCURXH 0x2B
WiredHome 175:7be3a1fb7fc2 130 #define RA8875_FCURYL 0x2C
WiredHome 175:7be3a1fb7fc2 131 #define RA8875_FCURYH 0x2D
WiredHome 175:7be3a1fb7fc2 132 #define RA8875_FWTYPSR 0x2E
WiredHome 175:7be3a1fb7fc2 133 #define RA8875_SFROMS 0x2F
WiredHome 175:7be3a1fb7fc2 134
WiredHome 175:7be3a1fb7fc2 135 #define RA8875_HSAW0 0x30
WiredHome 175:7be3a1fb7fc2 136 #define RA8875_HSAW1 0x31
WiredHome 175:7be3a1fb7fc2 137 #define RA8875_VSAW0 0x32
WiredHome 175:7be3a1fb7fc2 138 #define RA8875_VSAW1 0x33
WiredHome 175:7be3a1fb7fc2 139
WiredHome 175:7be3a1fb7fc2 140 #define RA8875_HEAW0 0x34
WiredHome 175:7be3a1fb7fc2 141 #define RA8875_HEAW1 0x35
WiredHome 175:7be3a1fb7fc2 142 #define RA8875_VEAW0 0x36
WiredHome 175:7be3a1fb7fc2 143 #define RA8875_VEAW1 0x37
WiredHome 175:7be3a1fb7fc2 144
WiredHome 175:7be3a1fb7fc2 145 #define RA8875_MWCR0 0x40
WiredHome 175:7be3a1fb7fc2 146 #define RA8875_MWCR0_GFXMODE 0x00
WiredHome 175:7be3a1fb7fc2 147 #define RA8875_MWCR0_TXTMODE 0x80
WiredHome 175:7be3a1fb7fc2 148
WiredHome 175:7be3a1fb7fc2 149 #define RA8875_MWCR1 0x41
WiredHome 175:7be3a1fb7fc2 150 #define RA8875_MWCR1_GFXCURDIS 0x00
WiredHome 175:7be3a1fb7fc2 151 #define RA8875_MWCR1_GFXCURENA 0x80
WiredHome 175:7be3a1fb7fc2 152
WiredHome 175:7be3a1fb7fc2 153 #define RA8875_BTCR 0x44
WiredHome 175:7be3a1fb7fc2 154 #define RA8875_MRCD 0x45
WiredHome 175:7be3a1fb7fc2 155 #define RA8875_CURH0 0x46
WiredHome 175:7be3a1fb7fc2 156 #define RA8875_CURH1 0x47
WiredHome 175:7be3a1fb7fc2 157 #define RA8875_CURV0 0x48
WiredHome 175:7be3a1fb7fc2 158 #define RA8875_CURV1 0x49
WiredHome 175:7be3a1fb7fc2 159
WiredHome 175:7be3a1fb7fc2 160 #define RA8875_RCURH0 0x4A
WiredHome 175:7be3a1fb7fc2 161 #define RA8875_RCURH1 0x4B
WiredHome 175:7be3a1fb7fc2 162 #define RA8875_RCURV0 0x4C
WiredHome 175:7be3a1fb7fc2 163 #define RA8875_RCURV1 0x4D
WiredHome 175:7be3a1fb7fc2 164 #define RA8875_CURHS 0x4E
WiredHome 175:7be3a1fb7fc2 165 #define RA8875_CURVS 0x4F
WiredHome 175:7be3a1fb7fc2 166
WiredHome 175:7be3a1fb7fc2 167 #define RA8875_BECR0 0x50
WiredHome 175:7be3a1fb7fc2 168 #define RA8875_BECR1 0x51
WiredHome 175:7be3a1fb7fc2 169
WiredHome 175:7be3a1fb7fc2 170 #define RA8875_LTPR0 0x52
WiredHome 175:7be3a1fb7fc2 171 #define RA8875_LTPR1 0x53
WiredHome 175:7be3a1fb7fc2 172
WiredHome 175:7be3a1fb7fc2 173 #define RA8875_HSBE0 0x54
WiredHome 175:7be3a1fb7fc2 174 #define RA8875_HSBE1 0x55
WiredHome 175:7be3a1fb7fc2 175 #define RA8875_VSBE0 0x56
WiredHome 175:7be3a1fb7fc2 176 #define RA8875_VSBE1 0x57
WiredHome 175:7be3a1fb7fc2 177 #define RA8875_HDBE0 0x58
WiredHome 175:7be3a1fb7fc2 178 #define RA8875_HDBE1 0x59
WiredHome 175:7be3a1fb7fc2 179 #define RA8875_VDBE0 0x5A
WiredHome 175:7be3a1fb7fc2 180 #define RA8875_VDBE1 0x5B
WiredHome 175:7be3a1fb7fc2 181 #define RA8875_BEWR0 0x5C
WiredHome 175:7be3a1fb7fc2 182 #define RA8875_BEWR1 0x5D
WiredHome 175:7be3a1fb7fc2 183 #define RA8875_BEHR0 0x5E
WiredHome 175:7be3a1fb7fc2 184 #define RA8875_BEHR1 0x5F
WiredHome 175:7be3a1fb7fc2 185
WiredHome 175:7be3a1fb7fc2 186
WiredHome 175:7be3a1fb7fc2 187
WiredHome 175:7be3a1fb7fc2 188
WiredHome 175:7be3a1fb7fc2 189 #define RA8875_TPCR0 0x70
WiredHome 175:7be3a1fb7fc2 190 #define RA8875_TPCR0_ENABLE 0x80
WiredHome 175:7be3a1fb7fc2 191 #define RA8875_TPCR0_DISABLE 0x00
WiredHome 175:7be3a1fb7fc2 192 #define RA8875_TPCR0_WAIT_512CLK 0x00
WiredHome 175:7be3a1fb7fc2 193 #define RA8875_TPCR0_WAIT_1024CLK 0x10
WiredHome 175:7be3a1fb7fc2 194 #define RA8875_TPCR0_WAIT_2048CLK 0x20
WiredHome 175:7be3a1fb7fc2 195 #define RA8875_TPCR0_WAIT_4096CLK 0x30
WiredHome 175:7be3a1fb7fc2 196 #define RA8875_TPCR0_WAIT_8192CLK 0x40
WiredHome 175:7be3a1fb7fc2 197 #define RA8875_TPCR0_WAIT_16384CLK 0x50
WiredHome 175:7be3a1fb7fc2 198 #define RA8875_TPCR0_WAIT_32768CLK 0x60
WiredHome 175:7be3a1fb7fc2 199 #define RA8875_TPCR0_WAIT_65536CLK 0x70
WiredHome 175:7be3a1fb7fc2 200 #define RA8875_TPCR0_WAKEENABLE 0x08
WiredHome 175:7be3a1fb7fc2 201 #define RA8875_TPCR0_WAKEDISABLE 0x00
WiredHome 175:7be3a1fb7fc2 202 #define RA8875_TPCR0_ADCCLK_DIV1 0x00
WiredHome 175:7be3a1fb7fc2 203 #define RA8875_TPCR0_ADCCLK_DIV2 0x01
WiredHome 175:7be3a1fb7fc2 204 #define RA8875_TPCR0_ADCCLK_DIV4 0x02
WiredHome 175:7be3a1fb7fc2 205 #define RA8875_TPCR0_ADCCLK_DIV8 0x03
WiredHome 175:7be3a1fb7fc2 206 #define RA8875_TPCR0_ADCCLK_DIV16 0x04
WiredHome 175:7be3a1fb7fc2 207 #define RA8875_TPCR0_ADCCLK_DIV32 0x05
WiredHome 175:7be3a1fb7fc2 208 #define RA8875_TPCR0_ADCCLK_DIV64 0x06
WiredHome 175:7be3a1fb7fc2 209 #define RA8875_TPCR0_ADCCLK_DIV128 0x07
WiredHome 175:7be3a1fb7fc2 210
WiredHome 175:7be3a1fb7fc2 211 #define RA8875_TPCR1 0x71
WiredHome 175:7be3a1fb7fc2 212 #define RA8875_TPCR1_AUTO 0x00
WiredHome 175:7be3a1fb7fc2 213 #define RA8875_TPCR1_MANUAL 0x40
WiredHome 175:7be3a1fb7fc2 214 #define RA8875_TPCR1_VREFINT 0x00
WiredHome 175:7be3a1fb7fc2 215 #define RA8875_TPCR1_VREFEXT 0x20
WiredHome 175:7be3a1fb7fc2 216 #define RA8875_TPCR1_DEBOUNCE 0x04
WiredHome 175:7be3a1fb7fc2 217 #define RA8875_TPCR1_NODEBOUNCE 0x00
WiredHome 175:7be3a1fb7fc2 218 #define RA8875_TPCR1_IDLE 0x00
WiredHome 175:7be3a1fb7fc2 219 #define RA8875_TPCR1_WAIT 0x01
WiredHome 175:7be3a1fb7fc2 220 #define RA8875_TPCR1_LATCHX 0x02
WiredHome 175:7be3a1fb7fc2 221 #define RA8875_TPCR1_LATCHY 0x03
WiredHome 175:7be3a1fb7fc2 222
WiredHome 175:7be3a1fb7fc2 223 #define RA8875_TPXH 0x72
WiredHome 175:7be3a1fb7fc2 224 #define RA8875_TPYH 0x73
WiredHome 175:7be3a1fb7fc2 225 #define RA8875_TPXYL 0x74
WiredHome 175:7be3a1fb7fc2 226
WiredHome 175:7be3a1fb7fc2 227 #define RA8875_PLLC1 0x88
WiredHome 175:7be3a1fb7fc2 228 #define RA8875_PLLC1_PLLDIV2 0x80
WiredHome 175:7be3a1fb7fc2 229 #define RA8875_PLLC1_PLLDIV1 0x00
WiredHome 175:7be3a1fb7fc2 230
WiredHome 175:7be3a1fb7fc2 231 #define RA8875_PLLC2 0x89
WiredHome 175:7be3a1fb7fc2 232 #define RA8875_PLLC2_DIV1 0x00
WiredHome 175:7be3a1fb7fc2 233 #define RA8875_PLLC2_DIV2 0x01
WiredHome 175:7be3a1fb7fc2 234 #define RA8875_PLLC2_DIV4 0x02
WiredHome 175:7be3a1fb7fc2 235 #define RA8875_PLLC2_DIV8 0x03
WiredHome 175:7be3a1fb7fc2 236 #define RA8875_PLLC2_DIV16 0x04
WiredHome 175:7be3a1fb7fc2 237 #define RA8875_PLLC2_DIV32 0x05
WiredHome 175:7be3a1fb7fc2 238 #define RA8875_PLLC2_DIV64 0x06
WiredHome 175:7be3a1fb7fc2 239 #define RA8875_PLLC2_DIV128 0x07
WiredHome 175:7be3a1fb7fc2 240
WiredHome 175:7be3a1fb7fc2 241 #define RA8875_MCLR 0x8E
WiredHome 175:7be3a1fb7fc2 242 #define RA8875_MCLR_START 0x80
WiredHome 175:7be3a1fb7fc2 243 #define RA8875_MCLR_STOP 0x00
WiredHome 175:7be3a1fb7fc2 244 #define RA8875_MCLR_READSTATUS 0x80
WiredHome 175:7be3a1fb7fc2 245 #define RA8875_MCLR_FULL 0x00
WiredHome 175:7be3a1fb7fc2 246 #define RA8875_MCLR_ACTIVE 0x40
WiredHome 175:7be3a1fb7fc2 247
WiredHome 175:7be3a1fb7fc2 248 #define RA8875_P1CR 0x8A
WiredHome 175:7be3a1fb7fc2 249 #define RA8875_P1CR_ENABLE 0x80
WiredHome 175:7be3a1fb7fc2 250 #define RA8875_P1CR_DISABLE 0x00
WiredHome 175:7be3a1fb7fc2 251 #define RA8875_P1CR_CLKOUT 0x10
WiredHome 175:7be3a1fb7fc2 252 #define RA8875_P1CR_PWMOUT 0x00
WiredHome 175:7be3a1fb7fc2 253
WiredHome 175:7be3a1fb7fc2 254 #define RA8875_P1DCR 0x8B
WiredHome 175:7be3a1fb7fc2 255
WiredHome 175:7be3a1fb7fc2 256 #define RA8875_P2CR 0x8C
WiredHome 175:7be3a1fb7fc2 257 #define RA8875_P2CR_ENABLE 0x80
WiredHome 175:7be3a1fb7fc2 258 #define RA8875_P2CR_DISABLE 0x00
WiredHome 175:7be3a1fb7fc2 259 #define RA8875_P2CR_CLKOUT 0x10
WiredHome 175:7be3a1fb7fc2 260 #define RA8875_P2CR_PWMOUT 0x00
WiredHome 175:7be3a1fb7fc2 261
WiredHome 175:7be3a1fb7fc2 262 #define RA8875_PWM_CLK_DIV1 0x00
WiredHome 175:7be3a1fb7fc2 263 #define RA8875_PWM_CLK_DIV2 0x01
WiredHome 175:7be3a1fb7fc2 264 #define RA8875_PWM_CLK_DIV4 0x02
WiredHome 175:7be3a1fb7fc2 265 #define RA8875_PWM_CLK_DIV8 0x03
WiredHome 175:7be3a1fb7fc2 266 #define RA8875_PWM_CLK_DIV16 0x04
WiredHome 175:7be3a1fb7fc2 267 #define RA8875_PWM_CLK_DIV32 0x05
WiredHome 175:7be3a1fb7fc2 268 #define RA8875_PWM_CLK_DIV64 0x06
WiredHome 175:7be3a1fb7fc2 269 #define RA8875_PWM_CLK_DIV128 0x07
WiredHome 175:7be3a1fb7fc2 270 #define RA8875_PWM_CLK_DIV256 0x08
WiredHome 175:7be3a1fb7fc2 271 #define RA8875_PWM_CLK_DIV512 0x09
WiredHome 175:7be3a1fb7fc2 272 #define RA8875_PWM_CLK_DIV1024 0x0A
WiredHome 175:7be3a1fb7fc2 273 #define RA8875_PWM_CLK_DIV2048 0x0B
WiredHome 175:7be3a1fb7fc2 274 #define RA8875_PWM_CLK_DIV4096 0x0C
WiredHome 175:7be3a1fb7fc2 275 #define RA8875_PWM_CLK_DIV8192 0x0D
WiredHome 175:7be3a1fb7fc2 276 #define RA8875_PWM_CLK_DIV16384 0x0E
WiredHome 175:7be3a1fb7fc2 277 #define RA8875_PWM_CLK_DIV32768 0x0F
WiredHome 175:7be3a1fb7fc2 278
WiredHome 175:7be3a1fb7fc2 279 #define RA8875_P2DCR 0x8D
WiredHome 175:7be3a1fb7fc2 280
WiredHome 175:7be3a1fb7fc2 281 #define RA8875_DCR 0x90
WiredHome 175:7be3a1fb7fc2 282 #define RA8875_DCR_LINESQUTRI_START 0x80
WiredHome 175:7be3a1fb7fc2 283 #define RA8875_DCR_LINESQUTRI_STOP 0x00
WiredHome 175:7be3a1fb7fc2 284 #define RA8875_DCR_LINESQUTRI_STATUS 0x80
WiredHome 175:7be3a1fb7fc2 285 #define RA8875_DCR_CIRCLE_START 0x40
WiredHome 175:7be3a1fb7fc2 286 #define RA8875_DCR_CIRCLE_STATUS 0x40
WiredHome 175:7be3a1fb7fc2 287 #define RA8875_DCR_CIRCLE_STOP 0x00
WiredHome 175:7be3a1fb7fc2 288 #define RA8875_DCR_FILL 0x20
WiredHome 175:7be3a1fb7fc2 289 #define RA8875_DCR_NOFILL 0x00
WiredHome 175:7be3a1fb7fc2 290 #define RA8875_DCR_DRAWSQUARE 0x10
WiredHome 175:7be3a1fb7fc2 291 #define RA8875_DCR_DRAWTRIANGLE 0x01
WiredHome 175:7be3a1fb7fc2 292 #define RA8875_DCR_DRAWLINE 0x00
WiredHome 175:7be3a1fb7fc2 293
WiredHome 175:7be3a1fb7fc2 294 #define RA8875_DLHSR0 0x91
WiredHome 175:7be3a1fb7fc2 295 #define RA8875_DLHSR1 0x92
WiredHome 175:7be3a1fb7fc2 296 #define RA8875_DLVSR0 0x93
WiredHome 175:7be3a1fb7fc2 297 #define RA8875_DLVSR1 0x94
WiredHome 175:7be3a1fb7fc2 298 #define RA8875_DLHER0 0x95
WiredHome 175:7be3a1fb7fc2 299 #define RA8875_DLHER1 0x96
WiredHome 175:7be3a1fb7fc2 300 #define RA8875_DLVER0 0x97
WiredHome 175:7be3a1fb7fc2 301 #define RA8875_DLVER1 0x98
WiredHome 175:7be3a1fb7fc2 302 #define RA8875_DCHR0 0x99
WiredHome 175:7be3a1fb7fc2 303 #define RA8875_DCHHR1 0x9A
WiredHome 175:7be3a1fb7fc2 304 #define RA8875_DCVR0 0x9B
WiredHome 175:7be3a1fb7fc2 305 #define RA8875_DCVR1 0x9C
WiredHome 175:7be3a1fb7fc2 306
WiredHome 175:7be3a1fb7fc2 307 #define RA8875_DCRR 0x9D
WiredHome 175:7be3a1fb7fc2 308
WiredHome 175:7be3a1fb7fc2 309 #define RA8875_ELLIPSE 0xA0
WiredHome 175:7be3a1fb7fc2 310 #define RA8875_ELLIPSE_STATUS 0x80
WiredHome 175:7be3a1fb7fc2 311
WiredHome 175:7be3a1fb7fc2 312 #define RA8875_ELLA0 0xA1
WiredHome 175:7be3a1fb7fc2 313 #define RA8875_ELLA1 0xA2
WiredHome 175:7be3a1fb7fc2 314 #define RA8875_ELLB0 0xA3
WiredHome 175:7be3a1fb7fc2 315 #define RA8875_ELLB1 0xA4
WiredHome 175:7be3a1fb7fc2 316 #define RA8875_DEHR0 0xA5
WiredHome 175:7be3a1fb7fc2 317 #define RA8875_DEHR1 0xA6
WiredHome 175:7be3a1fb7fc2 318 #define RA8875_DEVR0 0xA7
WiredHome 175:7be3a1fb7fc2 319 #define RA8875_DEVR1 0xA8
WiredHome 175:7be3a1fb7fc2 320
WiredHome 175:7be3a1fb7fc2 321 #define RA8875_DTPH0 0xA9
WiredHome 175:7be3a1fb7fc2 322 #define RA8875_DTPH1 0xAA
WiredHome 175:7be3a1fb7fc2 323 #define RA8875_DTPV0 0xAB
WiredHome 175:7be3a1fb7fc2 324 #define RA8875_DTPV1 0xAC
WiredHome 175:7be3a1fb7fc2 325
WiredHome 175:7be3a1fb7fc2 326 #define RA8875_KSCR1 0xC0
WiredHome 175:7be3a1fb7fc2 327 #define RA8875_KSCR2 0xC1
WiredHome 175:7be3a1fb7fc2 328
WiredHome 175:7be3a1fb7fc2 329 #define RA8875_INTC1 0xF0
WiredHome 175:7be3a1fb7fc2 330 #define RA8875_INTC1_KEY 0x10
WiredHome 175:7be3a1fb7fc2 331 #define RA8875_INTC1_DMA 0x08
WiredHome 175:7be3a1fb7fc2 332 #define RA8875_INTC1_TP 0x04
WiredHome 175:7be3a1fb7fc2 333 #define RA8875_INTC1_BTE 0x02
WiredHome 175:7be3a1fb7fc2 334
WiredHome 175:7be3a1fb7fc2 335 #define RA8875_INTC2 0xF1
WiredHome 175:7be3a1fb7fc2 336 #define RA8875_INTC2_KEY 0x10
WiredHome 175:7be3a1fb7fc2 337 #define RA8875_INTC2_DMA 0x08
WiredHome 175:7be3a1fb7fc2 338 #define RA8875_INTC2_TP 0x04
WiredHome 175:7be3a1fb7fc2 339 #define RA8875_INTC2_BTE 0x02
WiredHome 175:7be3a1fb7fc2 340
WiredHome 175:7be3a1fb7fc2 341
WiredHome 175:7be3a1fb7fc2 342
WiredHome 77:9206c13aa527 343 #endif // RA8875_REGS_H