[457] | 1 | /*
|
---|
| 2 | * TOPPERS BASE PLATFORM MIDDLEWARE
|
---|
| 3 | *
|
---|
| 4 | * Copyright (C) 2017-2018 by TOPPERS PROJECT
|
---|
| 5 | * Educational Working Group.
|
---|
| 6 | *
|
---|
| 7 | * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
|
---|
| 8 | * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改
|
---|
| 9 | * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する.
|
---|
| 10 | * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
|
---|
| 11 | * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
|
---|
| 12 | * スコード中に含まれていること.
|
---|
| 13 | * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
|
---|
| 14 | * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用
|
---|
| 15 | * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記
|
---|
| 16 | * の無保証規定を掲載すること.
|
---|
| 17 | * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
|
---|
| 18 | * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ
|
---|
| 19 | * と.
|
---|
| 20 | * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著
|
---|
| 21 | * 作権表示,この利用条件および下記の無保証規定を掲載すること.
|
---|
| 22 | * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに
|
---|
| 23 | * 報告すること.
|
---|
| 24 | * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
|
---|
| 25 | * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること.
|
---|
| 26 | * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理
|
---|
| 27 | * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを
|
---|
| 28 | * 免責すること.
|
---|
| 29 | *
|
---|
| 30 | * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お
|
---|
| 31 | * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的
|
---|
| 32 | * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ
|
---|
| 33 | * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ
|
---|
| 34 | * の責任を負わない.
|
---|
| 35 | *
|
---|
| 36 | * @(#) $Id$
|
---|
| 37 | */
|
---|
| 38 |
|
---|
| 39 | #ifndef _GLCD_DISP_H_
|
---|
| 40 | #define _GLCD_DISP_H_
|
---|
| 41 |
|
---|
| 42 | #ifdef __cplusplus
|
---|
| 43 | extern "C" {
|
---|
| 44 | #endif
|
---|
| 45 |
|
---|
| 46 | #include "glcd_core.h"
|
---|
| 47 | #include "fonts.h"
|
---|
| 48 |
|
---|
| 49 | /*
|
---|
| 50 | * テキスト表示ラインモード定義
|
---|
| 51 | */
|
---|
| 52 | typedef enum
|
---|
| 53 | {
|
---|
| 54 | CENTER_MODE = 0x01, /* Center mode */
|
---|
| 55 | RIGHT_MODE, /* Right mode */
|
---|
| 56 | LEFT_MODE /* Left mode */
|
---|
| 57 | }Line_ModeTypdef;
|
---|
| 58 |
|
---|
| 59 |
|
---|
| 60 | #define Font8 Embedded_Font9
|
---|
| 61 | #define Font12 Shinonome_Font12
|
---|
| 62 | #define Font16 Shinonome_Font16
|
---|
| 63 |
|
---|
| 64 | /*
|
---|
| 65 | * BSP表示関数変換定義
|
---|
| 66 | */
|
---|
| 67 | #define BSP_LCD_Init() lcd_init(pHLCD, LCD_ORIENTATION_LANDSCAPE)
|
---|
| 68 | #define BSP_LCD_DeInit() lcd_deinit(pHLCD)
|
---|
| 69 | #define BSP_LCD_LayerDefaultInit(a, b) lcd_layerdefaultinit(pHLCD, pDRAWPROP, (a), (b))
|
---|
| 70 | #define BSP_LCD_SetLayerWindow(i, x, y, w, h) lcd_setAddrWindow(pHLCD, (i), (x), (y), (w), (h))
|
---|
| 71 |
|
---|
| 72 | #define BSP_LCD_Clear(c) lcd_clear(pHLCD, (c))
|
---|
| 73 | #define BSP_LCD_ReadPixel(x, y) lcd_readPixel(pHLCD, (x), (y))
|
---|
| 74 | #define BSP_LCD_DrawPixel(x, y, c) lcd_drawPixel(pHLCD, (x), (y), (c))
|
---|
| 75 | #define BSP_LCD_DrawHLine(x, y, w) lcd_drawFastHLine(pHLCD, (x), (y), (w), pDRAWPROP->TextColor)
|
---|
| 76 | #define BSP_LCD_DrawVLine(x, y, h) lcd_drawFastVLine(pHLCD, (x), (y), (h), pDRAWPROP->TextColor)
|
---|
| 77 | #define BSP_LCD_DrawBitmap(x, y, p) lcd_drawBitmap(pHLCD, (x), (y), (p))
|
---|
| 78 | #define BSP_LCD_DrawRGBImage(x, y, xs, ys, p) lcd_drawRGBImage(pHLCD, (x), (y), (xs), (xy), (p))
|
---|
| 79 | #define BSP_LCD_DisplayOn() lcd_displayOn(pHLCD)
|
---|
| 80 | #define BSP_LCD_DisplayOff() lcd_displayOff(pHLCD)
|
---|
| 81 | #define BSP_LCD_FillRect(x, y, w,h) lcd_fillRect(pHLCD, (x), (y), (w), (h), pDRAWPROP->TextColor)
|
---|
| 82 |
|
---|
| 83 | #define BSP_LCD_DrawLine(x, y, x2, y2) lcd_drawLine(pDRAWPROP, (x), (y), (x2), (y2))
|
---|
| 84 | #define BSP_LCD_DrawRect(x, y, w, h) lcd_drawRect(pDRAWPROP, (x), (y), (w), (h))
|
---|
| 85 | #define BSP_LCD_DrawCircle(x, y, r) lcd_DrawCircle(pDRAWPROP, (x), (y), (r))
|
---|
| 86 | #define BSP_LCD_DrawEllipse(x, y, xr, yr) lcd_DrawEllipse(pDRAWPROP, (x), (y), (xr), (yr))
|
---|
| 87 | #define BSP_LCD_DrawPolygon(a, b) lcd_drawPolygon(pDRAWPROP, (a), (b))
|
---|
| 88 | #define BSP_LCD_FillCircle(x, y, r) lcd_fillCircle(pDRAWPROP, (x), (y), (r))
|
---|
| 89 | #define BSP_LCD_FillEllipse(x, y, xr, yr) lcd_fillEllipse(pDRAWPROP, (x), (y), (xr), (yr))
|
---|
| 90 | #define BSP_LCD_FillPolygon(a, b) lcd_fillPolygon(pDRAWPROP, (a), (b))
|
---|
| 91 |
|
---|
| 92 | #define BSP_LCD_ClearStringLine(l) lcd_clearStringLine(pDRAWPROP, (l))
|
---|
| 93 | #define BSP_LCD_DisplayChar(x, y, a) lcd_DisplayChar(pDRAWPROP, (x), (y), (a))
|
---|
| 94 | #define BSP_LCD_DisplayStringAt(x, y, t, m) lcd_DisplayStringAt(pDRAWPROP, (x), (y), (t), (m))
|
---|
| 95 | #define BSP_LCD_DisplayStringAtLine(l, p) lcd_DisplayStringAtLine(pDRAWPROP, (l), (p))
|
---|
| 96 |
|
---|
| 97 | #define BSP_LCD_SelectLayer(a) pHLCD->layer = (a)
|
---|
| 98 | #define BSP_LCD_GetXSize() pHLCD->_width
|
---|
| 99 | #define BSP_LCD_GetYSize() pHLCD->_height
|
---|
| 100 | #define BSP_LCD_SetTextColor(c) pDRAWPROP->TextColor = (c)
|
---|
| 101 | #define BSP_LCD_GetTextColor() pDRAWPROP->TextColor
|
---|
| 102 | #define BSP_LCD_SetBackColor(c) pDRAWPROP->BackColor = (c)
|
---|
| 103 | #define BSP_LCD_GetBackColor() pDRAWPROP->BackColor
|
---|
| 104 | #define BSP_LCD_SetFont(f) pDRAWPROP->pFont = (f)
|
---|
| 105 | #define BSP_LCD_GetFont() ((sFONT *)pDRAWPROP->pFont)
|
---|
| 106 |
|
---|
| 107 |
|
---|
| 108 | extern const font_t *lcd_getFontTable(font_head_t *phead, uint8_t *ptr);
|
---|
| 109 | extern void lcd_clearStringLine(LCD_DrawProp_t *pDrawProp, uint16_t Line);
|
---|
| 110 | extern void lcd_DisplayChar(LCD_DrawProp_t *pDrawProp, uint16_t Xpos, uint16_t Ypos, uint8_t Ascii);
|
---|
| 111 | extern void lcd_DisplayStringAt(LCD_DrawProp_t *pDrawProp, uint16_t Xpos, uint16_t Ypos, uint8_t *Text, Line_ModeTypdef Mode);
|
---|
| 112 | extern void lcd_DisplayStringAtLine(LCD_DrawProp_t *pDrawProp, uint16_t Line, uint8_t *ptr);
|
---|
| 113 |
|
---|
| 114 | #ifdef USE_ROMFONT
|
---|
| 115 | extern const uint8_t romfont[];
|
---|
| 116 | #endif
|
---|
| 117 |
|
---|
| 118 | #ifdef __cplusplus
|
---|
| 119 | }
|
---|
| 120 | #endif
|
---|
| 121 |
|
---|
| 122 | #endif /* _GLCD_DISP_H_ */
|
---|
| 123 |
|
---|