1 /** 2 * @file lcd.h 3 * @copyright Copyright (C) 2015-2018 Alibaba Group Holding Limited 4 */ 5 6 #ifndef AOS_HAL_LCD_H 7 #define AOS_HAL_LCD_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /** @addtogroup hal_lcd LCD 14 * lcd hal API. 15 * 16 * @{ 17 */ 18 19 #include <stdint.h> 20 #include <stdbool.h> 21 22 /** 23 * Init the lcd module. 24 * 25 * @retrun 0 on success, otherwise will be failed. 26 */ 27 int32_t aos_hal_lcd_init(void); 28 29 /** 30 * Uninit the lcd module. 31 * 32 * @retrun 0 on success, otherwise will be failed. 33 */ 34 int32_t aos_hal_lcd_uninit(void); 35 36 /** 37 * lcd show rect function. 38 * 39 * @param[in] x x coordinate 40 * @param[in] y y coordinate 41 * @param[in] w Graphic Wide 42 * @param[in] h Graphic High 43 * @param[in] buf Graphic Framebuffer 44 * @param[in] rotate Rotate (set true or false, The rotation angle is determined by the drivers) 45 * 46 * @return 0 on success, negative error on failure. 47 */ 48 int32_t aos_hal_lcd_show(int x, int y, int w, int h, uint8_t *buf, bool rotate); 49 50 /** 51 * udisplay draw function. 52 * 53 * @param[in] x x coordinate 54 * @param[in] y y coordinate 55 * @param[in] w Graphic Wide 56 * @param[in] h Graphic High 57 * @param[in] color Rectangle color 58 * 59 * @return 0 on success, negative error on failure. 60 */ 61 int32_t aos_hal_lcd_fill(int x, int y, int w, int h, uint32_t color); 62 63 /** @} */ 64 65 #ifdef __cplusplus 66 } 67 #endif 68 69 #endif /* AOS_HAL_LCD_H */ 70 71