epd.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /**
  2. ******************************************************************************
  3. * @file epd.h
  4. * @author MCD Application Team
  5. * @version V4.0.1
  6. * @date 21-July-2015
  7. * @brief This file contains all the functions prototypes for the
  8. * EPD (E Paper Display) driver.
  9. ******************************************************************************
  10. * @attention
  11. *
  12. * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
  13. *
  14. * Redistribution and use in source and binary forms, with or without modification,
  15. * are permitted provided that the following conditions are met:
  16. * 1. Redistributions of source code must retain the above copyright notice,
  17. * this list of conditions and the following disclaimer.
  18. * 2. Redistributions in binary form must reproduce the above copyright notice,
  19. * this list of conditions and the following disclaimer in the documentation
  20. * and/or other materials provided with the distribution.
  21. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  22. * may be used to endorse or promote products derived from this software
  23. * without specific prior written permission.
  24. *
  25. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  26. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  27. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  28. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  29. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  30. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  31. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  32. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  33. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  34. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35. *
  36. ******************************************************************************
  37. */
  38. /* Define to prevent recursive inclusion -------------------------------------*/
  39. #ifndef __EPD_H
  40. #define __EPD_H
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44. /* Includes ------------------------------------------------------------------*/
  45. #include <stdint.h>
  46. /** @addtogroup BSP
  47. * @{
  48. */
  49. /** @addtogroup Components
  50. * @{
  51. */
  52. /** @addtogroup Common
  53. * @{
  54. */
  55. /** @addtogroup EPD
  56. * @{
  57. */
  58. /** @defgroup EPD_Exported_Types
  59. * @{
  60. */
  61. /** @defgroup EPD_Driver_structure E Paper Display Driver structure
  62. * @{
  63. */
  64. typedef struct
  65. {
  66. void (*Init)(void);
  67. void (*WritePixel)(uint8_t);
  68. /* Optimized operation */
  69. void (*SetDisplayWindow)(uint16_t, uint16_t, uint16_t, uint16_t);
  70. void (*RefreshDisplay)(void);
  71. void (*CloseChargePump)(void);
  72. uint16_t (*GetEpdPixelWidth)(void);
  73. uint16_t (*GetEpdPixelHeight)(void);
  74. void (*DrawImage)(uint16_t, uint16_t, uint16_t, uint16_t, uint8_t*);
  75. }
  76. EPD_DrvTypeDef;
  77. /**
  78. * @}
  79. */
  80. /**
  81. * @}
  82. */
  83. /**
  84. * @}
  85. */
  86. /**
  87. * @}
  88. */
  89. /**
  90. * @}
  91. */
  92. #ifdef __cplusplus
  93. }
  94. #endif
  95. #endif /* EPD_H */
  96. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/