![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Example for the LPC4088 QSB Base Board
bmp.h@3:33a36d79ab7d, 2014-04-09 (annotated)
- Committer:
- embeddedartists
- Date:
- Wed Apr 09 10:26:13 2014 +0000
- Revision:
- 3:33a36d79ab7d
- Parent:
- 0:83b8ee8e8d4b
Updated to latest version of EALib
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
embeddedartists | 0:83b8ee8e8d4b | 1 | /* ---------------------------------------------------------------------------- |
embeddedartists | 0:83b8ee8e8d4b | 2 | * ATMEL Microcontroller Software Support - ROUSSET - |
embeddedartists | 0:83b8ee8e8d4b | 3 | * ---------------------------------------------------------------------------- |
embeddedartists | 0:83b8ee8e8d4b | 4 | * Copyright (c) 2006, Atmel Corporation |
embeddedartists | 0:83b8ee8e8d4b | 5 | |
embeddedartists | 0:83b8ee8e8d4b | 6 | * All rights reserved. |
embeddedartists | 0:83b8ee8e8d4b | 7 | * |
embeddedartists | 0:83b8ee8e8d4b | 8 | * Redistribution and use in source and binary forms, with or without |
embeddedartists | 0:83b8ee8e8d4b | 9 | * modification, are permitted provided that the following conditions are met: |
embeddedartists | 0:83b8ee8e8d4b | 10 | * |
embeddedartists | 0:83b8ee8e8d4b | 11 | * - Redistributions of source code must retain the above copyright notice, |
embeddedartists | 0:83b8ee8e8d4b | 12 | * this list of conditions and the disclaiimer below. |
embeddedartists | 0:83b8ee8e8d4b | 13 | * |
embeddedartists | 0:83b8ee8e8d4b | 14 | * - Redistributions in binary form must reproduce the above copyright notice, |
embeddedartists | 0:83b8ee8e8d4b | 15 | * this list of conditions and the disclaimer below in the documentation and/or |
embeddedartists | 0:83b8ee8e8d4b | 16 | * other materials provided with the distribution. |
embeddedartists | 0:83b8ee8e8d4b | 17 | * |
embeddedartists | 0:83b8ee8e8d4b | 18 | * Atmel's name may not be used to endorse or promote products derived from |
embeddedartists | 0:83b8ee8e8d4b | 19 | * this software without specific prior written permission. |
embeddedartists | 0:83b8ee8e8d4b | 20 | * |
embeddedartists | 0:83b8ee8e8d4b | 21 | * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR |
embeddedartists | 0:83b8ee8e8d4b | 22 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
embeddedartists | 0:83b8ee8e8d4b | 23 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE |
embeddedartists | 0:83b8ee8e8d4b | 24 | * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, |
embeddedartists | 0:83b8ee8e8d4b | 25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
embeddedartists | 0:83b8ee8e8d4b | 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, |
embeddedartists | 0:83b8ee8e8d4b | 27 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
embeddedartists | 0:83b8ee8e8d4b | 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
embeddedartists | 0:83b8ee8e8d4b | 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
embeddedartists | 0:83b8ee8e8d4b | 30 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
embeddedartists | 0:83b8ee8e8d4b | 31 | * ---------------------------------------------------------------------------- |
embeddedartists | 0:83b8ee8e8d4b | 32 | */ |
embeddedartists | 0:83b8ee8e8d4b | 33 | |
embeddedartists | 0:83b8ee8e8d4b | 34 | #ifndef BMP_H |
embeddedartists | 0:83b8ee8e8d4b | 35 | #define BMP_H |
embeddedartists | 0:83b8ee8e8d4b | 36 | |
embeddedartists | 0:83b8ee8e8d4b | 37 | //------------------------------------------------------------------------------ |
embeddedartists | 0:83b8ee8e8d4b | 38 | // Exported types |
embeddedartists | 0:83b8ee8e8d4b | 39 | //------------------------------------------------------------------------------ |
embeddedartists | 0:83b8ee8e8d4b | 40 | |
embeddedartists | 0:83b8ee8e8d4b | 41 | struct BMPHeader { |
embeddedartists | 0:83b8ee8e8d4b | 42 | |
embeddedartists | 0:83b8ee8e8d4b | 43 | unsigned short type; |
embeddedartists | 0:83b8ee8e8d4b | 44 | unsigned int fileSize; |
embeddedartists | 0:83b8ee8e8d4b | 45 | unsigned short reserved1; |
embeddedartists | 0:83b8ee8e8d4b | 46 | unsigned short reserved2; |
embeddedartists | 0:83b8ee8e8d4b | 47 | unsigned int offset; |
embeddedartists | 0:83b8ee8e8d4b | 48 | unsigned int headerSize; |
embeddedartists | 0:83b8ee8e8d4b | 49 | unsigned int width; |
embeddedartists | 0:83b8ee8e8d4b | 50 | unsigned int height; |
embeddedartists | 0:83b8ee8e8d4b | 51 | unsigned short planes; |
embeddedartists | 0:83b8ee8e8d4b | 52 | unsigned short bits; |
embeddedartists | 0:83b8ee8e8d4b | 53 | unsigned int compression; |
embeddedartists | 0:83b8ee8e8d4b | 54 | unsigned int imageSize; |
embeddedartists | 0:83b8ee8e8d4b | 55 | unsigned int xresolution; |
embeddedartists | 0:83b8ee8e8d4b | 56 | unsigned int yresolution; |
embeddedartists | 0:83b8ee8e8d4b | 57 | unsigned int ncolours; |
embeddedartists | 0:83b8ee8e8d4b | 58 | unsigned int importantcolours; |
embeddedartists | 0:83b8ee8e8d4b | 59 | |
embeddedartists | 0:83b8ee8e8d4b | 60 | } __attribute__ ((packed)); |
embeddedartists | 0:83b8ee8e8d4b | 61 | |
embeddedartists | 0:83b8ee8e8d4b | 62 | //------------------------------------------------------------------------------ |
embeddedartists | 0:83b8ee8e8d4b | 63 | // Exported functions |
embeddedartists | 0:83b8ee8e8d4b | 64 | //------------------------------------------------------------------------------ |
embeddedartists | 0:83b8ee8e8d4b | 65 | |
embeddedartists | 0:83b8ee8e8d4b | 66 | extern unsigned char BMP_IsValid(void *file); |
embeddedartists | 0:83b8ee8e8d4b | 67 | |
embeddedartists | 0:83b8ee8e8d4b | 68 | extern unsigned int BMP_GetFileSize(void *file); |
embeddedartists | 0:83b8ee8e8d4b | 69 | |
embeddedartists | 0:83b8ee8e8d4b | 70 | extern unsigned char BMP_Decode( |
embeddedartists | 0:83b8ee8e8d4b | 71 | void *file, |
embeddedartists | 0:83b8ee8e8d4b | 72 | unsigned char *buffer, |
embeddedartists | 0:83b8ee8e8d4b | 73 | unsigned int width, |
embeddedartists | 0:83b8ee8e8d4b | 74 | unsigned int height, |
embeddedartists | 0:83b8ee8e8d4b | 75 | unsigned char bpp); |
embeddedartists | 0:83b8ee8e8d4b | 76 | |
embeddedartists | 0:83b8ee8e8d4b | 77 | #endif //#ifndef BMP_H |
embeddedartists | 0:83b8ee8e8d4b | 78 | |
embeddedartists | 0:83b8ee8e8d4b | 79 | |
embeddedartists | 0:83b8ee8e8d4b | 80 |