You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

698 lines
21 KiB

5 years ago
  1. /* --COPYRIGHT--,BSD
  2. * Copyright (c) 2013, Texas Instruments Incorporated
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. *
  9. * * Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. *
  12. * * Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. *
  16. * * Neither the name of Texas Instruments Incorporated nor the names of
  17. * its contributors may be used to endorse or promote products derived
  18. * from this software without specific prior written permission.
  19. *
  20. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  21. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  22. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  23. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  24. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  25. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  26. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  27. * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  28. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  29. * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  30. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. * --/COPYRIGHT--*/
  32. //*****************************************************************************
  33. //
  34. // Close the Doxygen group.
  35. //! @}
  36. //
  37. //*****************************************************************************
  38. //*****************************************************************************
  39. //
  40. // IMPORTANT NOTE: The following driver file supports using either RAM or
  41. // non-volatile memory(Flash or FRAM) to store the LCD DisplayBuffer.
  42. //
  43. //*****************************************************************************
  44. //*****************************************************************************
  45. //
  46. // Sharp96x96.c
  47. //
  48. //*****************************************************************************
  49. //
  50. //! \addtogroup display_api
  51. //! @{
  52. //
  53. //*****************************************************************************
  54. #include "grlib.h"
  55. #include "Sharp96x96.h"
  56. #include <msp430.h>
  57. #ifdef __MSP430FR5969
  58. #include "HAL_MSP-EXP430FR5969_Sharp96x96.h"
  59. #include "../driverlibHeaders.h"
  60. #include "inc/hw_memmap.h"
  61. #elif defined(__MSP430G2553)
  62. #include "HAL_MSP-EXP430G2_Sharp96x96.h"
  63. #endif
  64. #include <stdint.h>
  65. static void Sharp96x96_InitializeDisplayBuffer(void *pvDisplayData, uint8_t ucValue);
  66. //*****************************************************************************
  67. //
  68. // If flash is used as non-volatile memory, the DisplayBuffer will have 32 extra
  69. // vertical lines to create a buffer size which is a multiple of 512 Byte
  70. // (this is the default size of flash memory segments in MSP430 device). It is
  71. // required that the display buffer is a multiple of 512 Bytes to be able to
  72. // initialize the buffer using the FLASH segment erase feature of the FLASH
  73. // controller.
  74. //
  75. //*****************************************************************************
  76. #ifdef NON_VOLATILE_MEMORY_BUFFER
  77. #pragma location=NON_VOLATILE_MEMORY_ADDRESS
  78. #endif
  79. #ifndef NON_VOLATILE_MEMORY_BUFFER
  80. uint8_t DisplayBuffer[LCD_VERTICAL_MAX][LCD_HORIZONTAL_MAX/8];
  81. #else
  82. #ifdef __ICC430__
  83. __no_init uint8_t DisplayBuffer[LCD_VERTICAL_MAX +32][LCD_HORIZONTAL_MAX/8];
  84. #else
  85. uint8_t DisplayBuffer[LCD_VERTICAL_MAX +32][LCD_HORIZONTAL_MAX/8];
  86. #endif //__ICC430__
  87. #endif //NON_VOLATILE_MEMORY_BUFFER
  88. uint8_t VCOMbit= 0x40;
  89. uint8_t flagSendToggleVCOMCommand = 0;
  90. //*******************************************************************************
  91. //
  92. //! Reverses the bit order.- Since the bit reversal function is called
  93. //! frequently by the several driver function this function is implemented
  94. //! to maximize code execution
  95. //
  96. //*******************************************************************************
  97. const uint8_t referse_data[] = {0x0, 0x8, 0x4, 0xC, 0x2, 0xA, 0x6, 0xE, 0x1, 0x9, 0x5, 0xD, 0x3, 0xB, 0x7, 0xF};
  98. uint8_t reverse(uint8_t x)
  99. {
  100. uint8_t b = 0;
  101. b = referse_data[x & 0xF]<<4;
  102. b |= referse_data[(x & 0xF0)>>4];
  103. return b;
  104. }
  105. //*****************************************************************************
  106. //
  107. //! Draws a pixel on the screen.
  108. //!
  109. //! \param pvDisplayData is a pointer to the driver-specific data for this
  110. //! display driver.
  111. //! \param lX is the X coordinate of the pixel.
  112. //! \param lY is the Y coordinate of the pixel.
  113. //! \param ulValue is the color of the pixel.
  114. //!
  115. //! This function sets the given pixel to a particular color. The coordinates
  116. //! of the pixel are assumed to be within the extents of the display.
  117. //!
  118. //! \return None.
  119. //
  120. //*****************************************************************************
  121. static void Sharp96x96_PixelDraw(void *pvDisplayData, int16_t lX, int16_t lY,
  122. uint16_t ulValue)
  123. {
  124. #ifdef NON_VOLATILE_MEMORY_BUFFER
  125. PrepareMemoryWrite();
  126. #endif
  127. if( ClrBlack == ulValue){
  128. DisplayBuffer[lY][lX>>3] &= ~(0x80 >> (lX & 0x7));
  129. }else{
  130. DisplayBuffer[lY][lX>>3] |= (0x80 >> (lX & 0x7));
  131. }
  132. #ifdef NON_VOLATILE_MEMORY_BUFFER
  133. FinishMemoryWrite();
  134. #endif
  135. }
  136. //*****************************************************************************
  137. //
  138. //! Draws a horizontal sequence of pixels on the screen.
  139. //!
  140. //! \param pvDisplayData is a pointer to the driver-specific data for this
  141. //! display driver.
  142. //! \param lX is the X coordinate of the first pixel.
  143. //! \param lY is the Y coordinate of the first pixel.
  144. //! \param lX0 is sub-pixel offset within the pixel data, which is valid for 1
  145. //! or 4 bit per pixel formats.
  146. //! \param lCount is the number of pixels to draw.
  147. //! \param lBPP is the number of bits per pixel; must be 1, 4, or 8.
  148. //! \param pucData is a pointer to the pixel data. For 1 and 4 bit per pixel
  149. //! formats, the most significant bit(s) represent the left-most pixel.
  150. //! \param pucPalette is a pointer to the palette used to draw the pixels.
  151. //!
  152. //! This function draws a horizontal sequence of pixels on the screen, using
  153. //! the supplied palette. For 1 bit per pixel format, the palette contains
  154. //! pre-translated colors; for 4 and 8 bit per pixel formats, the palette
  155. //! contains 24-bit RGB values that must be translated before being written to
  156. //! the display.
  157. //!
  158. //! \return None.
  159. //
  160. //*****************************************************************************
  161. static void Sharp96x96_DrawMultiple(void *pvDisplayData, int16_t lX,
  162. int16_t lY, int16_t lX0, int16_t lCount,
  163. int16_t lBPP,
  164. const uint8_t *pucData,
  165. const uint16_t *pucPalette)
  166. {
  167. uint8_t *pData = &DisplayBuffer[lY][lX>>3];
  168. uint16_t xj = 0;
  169. #ifdef NON_VOLATILE_MEMORY_BUFFER
  170. PrepareMemoryWrite();
  171. #endif
  172. //Write bytes of data to the display buffer
  173. for(xj=0;xj<lCount>>3;xj++){
  174. *pData++ = *pucData++;
  175. }
  176. //Write last data byte to the display buffer
  177. *pData = (*pData & (0xFF >> (lCount & 0x7))) | *pucData;
  178. #ifdef NON_VOLATILE_MEMORY_BUFFER
  179. FinishMemoryWrite();
  180. #endif
  181. }
  182. //*****************************************************************************
  183. //
  184. //! Draws a horizontal line.
  185. //!
  186. //! \param pvDisplayData is a pointer to the driver-specific data for this
  187. //! display driver.
  188. //! \param lX1 is the X coordinate of the start of the line.
  189. //! \param lX2 is the X coordinate of the end of the line.
  190. //! \param lY is the Y coordinate of the line.
  191. //! \param ulValue is the color of the line.
  192. //!
  193. //! This function draws a horizontal line on the display. The coordinates of
  194. //! the line are assumed to be within the extents of the display.
  195. //!
  196. //! \return None.
  197. //
  198. //*****************************************************************************
  199. static void Sharp96x96_LineDrawH(void *pvDisplayData, int16_t lX1, int16_t lX2,
  200. int16_t lY, uint16_t ulValue)
  201. {
  202. volatile uint16_t xi = 0;
  203. volatile uint16_t x_index_min = lX1>>3;
  204. volatile uint16_t x_index_max = lX2>>3;
  205. volatile uint8_t *pucData, ucfirst_x_byte, uclast_x_byte;
  206. #ifdef NON_VOLATILE_MEMORY_BUFFER
  207. PrepareMemoryWrite();
  208. #endif
  209. //calculate first byte
  210. //mod by 8 and shift this # bits
  211. ucfirst_x_byte = (0xFF >> (lX1 & 0x7));
  212. //calculate last byte
  213. //mod by 8 and shift this # bits
  214. uclast_x_byte = (0xFF << (7-(lX2 & 0x7)));
  215. //check if more than one data byte
  216. if(x_index_min != x_index_max){
  217. //set buffer to correct location
  218. pucData = &DisplayBuffer[lY][x_index_min];
  219. //black pixels (clear bits)
  220. if(ClrBlack == ulValue)
  221. {
  222. //write first byte
  223. *pucData++ &= ~ucfirst_x_byte;
  224. //write middle bytes
  225. for(xi = x_index_min; xi < x_index_max-1; xi++)
  226. {
  227. *pucData++ = 0x00;
  228. }
  229. //write last byte
  230. *pucData &= ~uclast_x_byte;
  231. }
  232. //white pixels (set bits)
  233. else
  234. {
  235. //write first byte
  236. *pucData++ |= ucfirst_x_byte;
  237. //write middle bytes
  238. for(xi = x_index_min; xi < x_index_max-1; xi++)
  239. {
  240. *pucData++ = 0xFF;
  241. }
  242. //write last byte
  243. *pucData |= uclast_x_byte;
  244. }
  245. }
  246. //only one data byte
  247. else
  248. {
  249. //calculate value of single byte
  250. ucfirst_x_byte &= uclast_x_byte;
  251. //set buffer to correct location
  252. pucData = &DisplayBuffer[lY][x_index_min];
  253. //draw black pixels (clear bits)
  254. if(ClrBlack == ulValue)
  255. {
  256. *pucData++ &= ~ucfirst_x_byte;
  257. }
  258. //white pixels (set bits)
  259. else
  260. {
  261. *pucData++ |= ucfirst_x_byte;
  262. }
  263. }
  264. #ifdef NON_VOLATILE_MEMORY_BUFFER
  265. FinishMemoryWrite();
  266. #endif
  267. }
  268. //*****************************************************************************
  269. //
  270. //! Draws a vertical line.
  271. //!
  272. //! \param pvDisplayData is a pointer to the driver-specific data for this
  273. //! display driver.
  274. //! \param lX is the X coordinate of the line.
  275. //! \param lY1 is the Y coordinate of the start of the line.
  276. //! \param lY2 is the Y coordinate of the end of the line.
  277. //! \param ulValue is the color of the line.
  278. //!
  279. //! This function draws a vertical line on the display. The coordinates of the
  280. //! line are assumed to be within the extents of the display.
  281. //!
  282. //! \return None.
  283. //
  284. //*****************************************************************************
  285. static void Sharp96x96_LineDrawV(void *pvDisplayData, int16_t lX, int16_t lY1,
  286. int16_t lY2, uint16_t ulValue)
  287. {
  288. volatile uint16_t yi = 0;
  289. volatile uint16_t x_index = lX>>3;
  290. volatile uint8_t data_byte;
  291. #ifdef NON_VOLATILE_MEMORY_BUFFER
  292. PrepareMemoryWrite();
  293. #endif
  294. //calculate data byte
  295. //mod by 8 and shift this # bits
  296. data_byte = (0x80 >> (lX & 0x7));
  297. //write data to the display buffer
  298. for(yi = lY1; yi <= lY2; yi++){
  299. //black pixels (clear bits)
  300. if(ClrBlack == ulValue)
  301. {
  302. DisplayBuffer[yi][x_index] &= ~data_byte;
  303. }
  304. //white pixels (set bits)
  305. else
  306. {
  307. DisplayBuffer[yi][x_index] |= data_byte;
  308. }
  309. }
  310. #ifdef NON_VOLATILE_MEMORY_BUFFER
  311. FinishMemoryWrite();
  312. #endif
  313. }
  314. //*****************************************************************************
  315. //
  316. //! Fills a rectangle.
  317. //!
  318. //! \param pvDisplayData is a pointer to the driver-specific data for this
  319. //! display driver.
  320. //! \param pRect is a pointer to the structure describing the rectangle.
  321. //! \param ulValue is the color of the rectangle.
  322. //!
  323. //! This function fills a rectangle on the display. The coordinates of the
  324. //! rectangle are assumed to be within the extents of the display, and the
  325. //! rectangle specification is fully inclusive (in other words, both sXMin and
  326. //! sXMax are drawn, along with sYMin and sYMax).
  327. //!
  328. //! \return None.
  329. //
  330. //*****************************************************************************
  331. static void Sharp96x96_RectFill(void *pvDisplayData, const tRectangle *pRect,
  332. uint16_t ulValue)
  333. {
  334. volatile uint16_t xi = 0;
  335. volatile uint16_t yi = 0;
  336. volatile uint16_t x_index_min = pRect->sXMin>>3;
  337. volatile uint16_t x_index_max = pRect->sXMax>>3;
  338. volatile uint8_t *pucData, ucfirst_x_byte, uclast_x_byte;
  339. #ifdef NON_VOLATILE_MEMORY_BUFFER
  340. PrepareMemoryWrite();
  341. #endif
  342. //calculate first byte
  343. //mod by 8 and shift this # bits
  344. ucfirst_x_byte = (0xFF >> (pRect->sXMin & 0x7));
  345. //calculate last byte
  346. //mod by 8 and shift this # bits
  347. uclast_x_byte = (0xFF << (7-(pRect->sXMax & 0x7)));
  348. //check if more than one data byte
  349. if(x_index_min != x_index_max){
  350. //write bytes
  351. for (yi = pRect->sYMin; yi<= pRect->sYMax; yi++)
  352. {
  353. //set buffer to correct location
  354. pucData = &DisplayBuffer[yi][x_index_min];
  355. //black pixels (clear bits)
  356. if(ClrBlack == ulValue)
  357. {
  358. //write first byte
  359. *pucData++ &= ~ucfirst_x_byte;
  360. //write middle bytes
  361. for(xi = x_index_min; xi < x_index_max-1; xi++)
  362. {
  363. *pucData++ = 0x00;
  364. }
  365. //write last byte
  366. *pucData &= ~uclast_x_byte;
  367. }
  368. //white pixels (set bits)
  369. else
  370. {
  371. //write first byte
  372. *pucData++ |= ucfirst_x_byte;
  373. //write middle bytes
  374. for(xi = x_index_min; xi < x_index_max-1; xi++)
  375. {
  376. *pucData++ = 0xFF;
  377. }
  378. //write last byte
  379. *pucData |= uclast_x_byte;
  380. }
  381. }
  382. }
  383. //only one data byte
  384. else
  385. {
  386. //calculate value of single byte
  387. ucfirst_x_byte &= uclast_x_byte;
  388. //set buffer to correct location
  389. pucData = &DisplayBuffer[pRect->sYMin][x_index_min];
  390. //black pixels (clear bits)
  391. if(ClrBlack == ulValue)
  392. {
  393. *pucData++ &= ~ucfirst_x_byte;
  394. }
  395. //white pixels (set bits)
  396. else
  397. {
  398. *pucData++ |= ucfirst_x_byte;
  399. }
  400. }
  401. #ifdef NON_VOLATILE_MEMORY_BUFFER
  402. FinishMemoryWrite();
  403. #endif
  404. }
  405. //*****************************************************************************
  406. //
  407. //! Translates a 24-bit RGB color to a display driver-specific color.
  408. //!
  409. //! \param pvDisplayData is a pointer to the driver-specific data for this
  410. //! display driver.
  411. //! \param ulValue is the 24-bit RGB color. The least-significant byte is the
  412. //! blue channel, the next byte is the green channel, and the third byte is the
  413. //! red channel.
  414. //!
  415. //! This function translates a 24-bit RGB color into a value that can be
  416. //! written into the display's frame buffer in order to reproduce that color,
  417. //! or the closest possible approximation of that color.
  418. //!
  419. //! \return Returns the display-driver specific color.
  420. //
  421. //*****************************************************************************
  422. static uint16_t Sharp96x96_ColorTranslate(void *pvDisplayData,
  423. uint32_t ulValue)
  424. {
  425. //
  426. // Translate from a 24-bit RGB color to mono color.
  427. //
  428. return(DPYCOLORTRANSLATE(ulValue));
  429. }
  430. //*****************************************************************************
  431. //
  432. //! Flushes any cached drawing operations.
  433. //!
  434. //! \param pvDisplayData is a pointer to the driver-specific data for this
  435. //! display driver.
  436. //!
  437. //!
  438. //! This functions flushes any cached drawing operations to the display. This
  439. //! is useful when a local frame buffer is used for drawing operations, and the
  440. //! flush would copy the local frame buffer to the display.
  441. //!
  442. //! \return None.
  443. //
  444. //*****************************************************************************
  445. static void Sharp96x96_Flush (void *pvDisplayData)
  446. {
  447. uint8_t *pucData = &DisplayBuffer[0][0];
  448. int32_t xi =0;
  449. int32_t xj = 0;
  450. //image update mode(1X000000b)
  451. uint8_t command = SHARP_LCD_CMD_WRITE_LINE;
  452. //COM inversion bit
  453. command = command^VCOMbit;
  454. SetCS();
  455. WriteCmdData(command);
  456. flagSendToggleVCOMCommand = SHARP_SKIP_TOGGLE_VCOM_COMMAND;
  457. #ifdef LANDSCAPE
  458. for(xj=0; xj<LCD_VERTICAL_MAX; xj++)
  459. {
  460. WriteCmdData(reverse(xj + 1));
  461. for(xi=0; xi<(LCD_HORIZONTAL_MAX>>3); xi++)
  462. {
  463. WriteCmdData(*(pucData++));
  464. }
  465. WriteCmdData(SHARP_LCD_TRAILER_BYTE);
  466. }
  467. #endif
  468. #ifdef LANDSCAPE_FLIP
  469. pucData = &DisplayBuffer[LCD_VERTICAL_MAX-1][(LCD_HORIZONTAL_MAX>>3)-1];
  470. for(xj=1; xj<=LCD_VERTICAL_MAX; xj++)
  471. {
  472. WriteCmdData(reverse(xj));
  473. for(xi=0; xi < (LCD_HORIZONTAL_MAX>>3); xi++)
  474. {
  475. WriteCmdData(reverse(*pucData--));
  476. }
  477. WriteCmdData(SHARP_LCD_TRAILER_BYTE);
  478. }
  479. #endif
  480. WriteCmdData(SHARP_LCD_TRAILER_BYTE);
  481. // Wait for last byte to be sent, then drop SCS
  482. WaitUntilLcdWriteFinished();
  483. // Ensure a 2us min delay to meet the LCD's thSCS
  484. __delay_cycles(SYSTEM_CLOCK_SPEED * 0.000002);
  485. ClearCS();
  486. }
  487. //*****************************************************************************
  488. //
  489. //! Send command to clear screen.
  490. //!
  491. //! \param pvDisplayData is a pointer to the driver-specific data for this
  492. //! display driver.
  493. //! \param ucValue is the background color of the buffered data.
  494. //!
  495. //! This function sets every pixel to the background color.
  496. //!
  497. //! \return None.
  498. //
  499. //*****************************************************************************
  500. static void Sharp96x96_ClearScreen (void *pvDisplayData, uint16_t ulValue)
  501. {
  502. //clear screen mode(0X100000b)
  503. uint8_t command = SHARP_LCD_CMD_CLEAR_SCREEN;
  504. //COM inversion bit
  505. command = command^VCOMbit;
  506. SetCS();
  507. WriteCmdData(command);
  508. flagSendToggleVCOMCommand = SHARP_SKIP_TOGGLE_VCOM_COMMAND;
  509. WriteCmdData(SHARP_LCD_TRAILER_BYTE);
  510. // Wait for last byte to be sent, then drop SCS
  511. WaitUntilLcdWriteFinished();
  512. // Ensure a 2us min delay to meet the LCD's thSCS
  513. __delay_cycles(SYSTEM_CLOCK_SPEED * 0.000002);
  514. ClearCS();
  515. if(ClrBlack == ulValue)
  516. Sharp96x96_InitializeDisplayBuffer(pvDisplayData, SHARP_BLACK);
  517. else
  518. Sharp96x96_InitializeDisplayBuffer(pvDisplayData, SHARP_WHITE);
  519. }
  520. //*****************************************************************************
  521. //
  522. //! Send toggle VCOM command.
  523. //!
  524. //! This function toggles the state of VCOM which prevents a DC bias from being
  525. //! built up within the panel.
  526. //!
  527. //! \return None.
  528. //
  529. //*****************************************************************************
  530. void Sharp96x96_SendToggleVCOMCommand()
  531. {
  532. VCOMbit ^= SHARP_VCOM_TOGGLE_BIT;
  533. if(SHARP_SEND_TOGGLE_VCOM_COMMAND == flagSendToggleVCOMCommand)
  534. {
  535. //clear screen mode(0X100000b)
  536. uint8_t command = SHARP_LCD_CMD_CHANGE_VCOM;
  537. //COM inversion bit
  538. command = command^VCOMbit;
  539. SetCS();
  540. WriteCmdData(command);
  541. WriteCmdData(SHARP_LCD_TRAILER_BYTE);
  542. // Wait for last byte to be sent, then drop SCS
  543. WaitUntilLcdWriteFinished();
  544. // Ensure a 2us min delay to meet the LCD's thSCS
  545. __delay_cycles(SYSTEM_CLOCK_SPEED * 0.000002);
  546. ClearCS();
  547. }
  548. flagSendToggleVCOMCommand = SHARP_SEND_TOGGLE_VCOM_COMMAND;
  549. }
  550. //*****************************************************************************
  551. //
  552. //! Initialize DisplayBuffer.
  553. //!
  554. //! \param pvDisplayData is a pointer to the driver-specific data for this
  555. //! display driver.
  556. //!
  557. //! \param ucValue is the foreground color of the buffered data.
  558. //!
  559. //! This function initializes the display buffer and discards any cached data.
  560. //!
  561. //! \return None.
  562. //
  563. //*****************************************************************************
  564. static void Sharp96x96_InitializeDisplayBuffer(void *pvDisplayData, uint8_t ucValue)
  565. {
  566. uint16_t i=0,j=0;
  567. uint8_t *pucData = pvDisplayData;
  568. #ifdef USE_FLASH_BUFFER
  569. // This is a callback function to HAL file since it implements device specific
  570. // functionality
  571. InitializeDisplayBuffer(pvDisplayData, ucValue);
  572. #else
  573. for(i =0; i< LCD_VERTICAL_MAX; i++)
  574. for(j =0; j< (LCD_HORIZONTAL_MAX>>3); j++)
  575. *pucData++ = ucValue;
  576. #endif //USE_FLASH_BUFFER
  577. }
  578. //*****************************************************************************
  579. //
  580. //! The display structure that describes the driver for the
  581. //! sharpLCD panel
  582. //
  583. //*****************************************************************************
  584. const tDisplay g_sharp96x96LCD =
  585. {
  586. sizeof(tDisplay),
  587. DisplayBuffer,
  588. LCD_HORIZONTAL_MAX,
  589. LCD_VERTICAL_MAX,
  590. Sharp96x96_PixelDraw, //PixelDraw,
  591. Sharp96x96_DrawMultiple,
  592. Sharp96x96_LineDrawH,
  593. Sharp96x96_LineDrawV, //LineDrawV,
  594. Sharp96x96_RectFill, //RectFill,
  595. Sharp96x96_ColorTranslate,
  596. Sharp96x96_Flush, //Flush
  597. Sharp96x96_ClearScreen //Clear screen. Contents of display buffer unmodified
  598. };
  599. //*****************************************************************************
  600. //
  601. // Close the Doxygen group.
  602. //! @}
  603. //
  604. //*****************************************************************************