Library for Waveshare 2.7" tri-colour e-Paper display.
fonts.h@0:9e6a8e3cd8de, 2019-12-06 (annotated)
- Committer:
- mdroberts1243
- Date:
- Fri Dec 06 23:24:50 2019 +0000
- Revision:
- 0:9e6a8e3cd8de
First commit of code modified from Kanjia examples for 2.13" Waveshare example
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mdroberts1243 | 0:9e6a8e3cd8de | 1 | /** |
mdroberts1243 | 0:9e6a8e3cd8de | 2 | ****************************************************************************** |
mdroberts1243 | 0:9e6a8e3cd8de | 3 | * @file fonts.h |
mdroberts1243 | 0:9e6a8e3cd8de | 4 | * @author MCD Application Team |
mdroberts1243 | 0:9e6a8e3cd8de | 5 | * @version V1.0.0 |
mdroberts1243 | 0:9e6a8e3cd8de | 6 | * @date 18-February-2014 |
mdroberts1243 | 0:9e6a8e3cd8de | 7 | * @brief Header for fonts.c file |
mdroberts1243 | 0:9e6a8e3cd8de | 8 | ****************************************************************************** |
mdroberts1243 | 0:9e6a8e3cd8de | 9 | * @attention |
mdroberts1243 | 0:9e6a8e3cd8de | 10 | * |
mdroberts1243 | 0:9e6a8e3cd8de | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
mdroberts1243 | 0:9e6a8e3cd8de | 12 | * |
mdroberts1243 | 0:9e6a8e3cd8de | 13 | * Redistribution and use in source and binary forms, with or without modification, |
mdroberts1243 | 0:9e6a8e3cd8de | 14 | * are permitted provided that the following conditions are met: |
mdroberts1243 | 0:9e6a8e3cd8de | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
mdroberts1243 | 0:9e6a8e3cd8de | 16 | * this list of conditions and the following disclaimer. |
mdroberts1243 | 0:9e6a8e3cd8de | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mdroberts1243 | 0:9e6a8e3cd8de | 18 | * this list of conditions and the following disclaimer in the documentation |
mdroberts1243 | 0:9e6a8e3cd8de | 19 | * and/or other materials provided with the distribution. |
mdroberts1243 | 0:9e6a8e3cd8de | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mdroberts1243 | 0:9e6a8e3cd8de | 21 | * may be used to endorse or promote products derived from this software |
mdroberts1243 | 0:9e6a8e3cd8de | 22 | * without specific prior written permission. |
mdroberts1243 | 0:9e6a8e3cd8de | 23 | * |
mdroberts1243 | 0:9e6a8e3cd8de | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mdroberts1243 | 0:9e6a8e3cd8de | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mdroberts1243 | 0:9e6a8e3cd8de | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mdroberts1243 | 0:9e6a8e3cd8de | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mdroberts1243 | 0:9e6a8e3cd8de | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mdroberts1243 | 0:9e6a8e3cd8de | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mdroberts1243 | 0:9e6a8e3cd8de | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mdroberts1243 | 0:9e6a8e3cd8de | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mdroberts1243 | 0:9e6a8e3cd8de | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mdroberts1243 | 0:9e6a8e3cd8de | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mdroberts1243 | 0:9e6a8e3cd8de | 34 | * |
mdroberts1243 | 0:9e6a8e3cd8de | 35 | ****************************************************************************** |
mdroberts1243 | 0:9e6a8e3cd8de | 36 | */ |
mdroberts1243 | 0:9e6a8e3cd8de | 37 | |
mdroberts1243 | 0:9e6a8e3cd8de | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mdroberts1243 | 0:9e6a8e3cd8de | 39 | #ifndef __FONTS_H |
mdroberts1243 | 0:9e6a8e3cd8de | 40 | #define __FONTS_H |
mdroberts1243 | 0:9e6a8e3cd8de | 41 | |
mdroberts1243 | 0:9e6a8e3cd8de | 42 | /* Max size of bitmap will based on a font24 (17x24) */ |
mdroberts1243 | 0:9e6a8e3cd8de | 43 | #define MAX_HEIGHT_FONT 24 |
mdroberts1243 | 0:9e6a8e3cd8de | 44 | #define MAX_WIDTH_FONT 17 |
mdroberts1243 | 0:9e6a8e3cd8de | 45 | #define OFFSET_BITMAP 54 |
mdroberts1243 | 0:9e6a8e3cd8de | 46 | |
mdroberts1243 | 0:9e6a8e3cd8de | 47 | #ifdef __cplusplus |
mdroberts1243 | 0:9e6a8e3cd8de | 48 | extern "C" { |
mdroberts1243 | 0:9e6a8e3cd8de | 49 | #endif |
mdroberts1243 | 0:9e6a8e3cd8de | 50 | |
mdroberts1243 | 0:9e6a8e3cd8de | 51 | /* Includes ------------------------------------------------------------------*/ |
mdroberts1243 | 0:9e6a8e3cd8de | 52 | #include <stdint.h> |
mdroberts1243 | 0:9e6a8e3cd8de | 53 | |
mdroberts1243 | 0:9e6a8e3cd8de | 54 | typedef struct _tFont |
mdroberts1243 | 0:9e6a8e3cd8de | 55 | { |
mdroberts1243 | 0:9e6a8e3cd8de | 56 | const uint8_t *table; |
mdroberts1243 | 0:9e6a8e3cd8de | 57 | uint16_t Width; |
mdroberts1243 | 0:9e6a8e3cd8de | 58 | uint16_t Height; |
mdroberts1243 | 0:9e6a8e3cd8de | 59 | |
mdroberts1243 | 0:9e6a8e3cd8de | 60 | } sFONT; |
mdroberts1243 | 0:9e6a8e3cd8de | 61 | |
mdroberts1243 | 0:9e6a8e3cd8de | 62 | extern sFONT Font24; |
mdroberts1243 | 0:9e6a8e3cd8de | 63 | extern sFONT Font20; |
mdroberts1243 | 0:9e6a8e3cd8de | 64 | extern sFONT Font16; |
mdroberts1243 | 0:9e6a8e3cd8de | 65 | extern sFONT Font12; |
mdroberts1243 | 0:9e6a8e3cd8de | 66 | extern sFONT Font8; |
mdroberts1243 | 0:9e6a8e3cd8de | 67 | |
mdroberts1243 | 0:9e6a8e3cd8de | 68 | #ifdef __cplusplus |
mdroberts1243 | 0:9e6a8e3cd8de | 69 | } |
mdroberts1243 | 0:9e6a8e3cd8de | 70 | #endif |
mdroberts1243 | 0:9e6a8e3cd8de | 71 | |
mdroberts1243 | 0:9e6a8e3cd8de | 72 | #endif /* __FONTS_H */ |
mdroberts1243 | 0:9e6a8e3cd8de | 73 | |
mdroberts1243 | 0:9e6a8e3cd8de | 74 | |
mdroberts1243 | 0:9e6a8e3cd8de | 75 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |