Error as described in MBs email to MS

Dependencies:   SDFileSystem app epson mbed msp430 pl tests

Committer:
marcbax
Date:
Thu Jan 11 14:12:00 2018 +0000
Revision:
1:5874c1a074a7
Parent:
0:c643d398cdb6
Version 180111a with error as reported to Mark Symonds

Who changed what in which revision?

UserRevisionLine numberNew contents of line
marcbax 0:c643d398cdb6 1 /*
marcbax 0:c643d398cdb6 2 Plastic Logic EPD project on MSP430
marcbax 0:c643d398cdb6 3
marcbax 0:c643d398cdb6 4 Copyright (C) 2013, 2014 Plastic Logic Limited
marcbax 0:c643d398cdb6 5
marcbax 0:c643d398cdb6 6 This program is free software: you can redistribute it and/or modify
marcbax 0:c643d398cdb6 7 it under the terms of the GNU General Public License as published by
marcbax 0:c643d398cdb6 8 the Free Software Foundation, either version 3 of the License, or
marcbax 0:c643d398cdb6 9 (at your option) any later version.
marcbax 0:c643d398cdb6 10
marcbax 0:c643d398cdb6 11 This program is distributed in the hope that it will be useful,
marcbax 0:c643d398cdb6 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
marcbax 0:c643d398cdb6 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
marcbax 0:c643d398cdb6 14 GNU General Public License for more details.
marcbax 0:c643d398cdb6 15
marcbax 0:c643d398cdb6 16 You should have received a copy of the GNU General Public License
marcbax 0:c643d398cdb6 17 along with this program. If not, see <http://www.gnu.org/licenses/>.
marcbax 0:c643d398cdb6 18 */
marcbax 0:c643d398cdb6 19 /*
marcbax 0:c643d398cdb6 20 * pnm-utils.h -- Utilities for dealing with PNM format graphics files
marcbax 0:c643d398cdb6 21 *
marcbax 0:c643d398cdb6 22 * Authors:
marcbax 0:c643d398cdb6 23 * Nick Terry <nick.terry@plasticlogic.com>
marcbax 0:c643d398cdb6 24 * Guillaume Tucker <guillaume.tucker@plasticlogic.com>
marcbax 0:c643d398cdb6 25 *
marcbax 0:c643d398cdb6 26 */
marcbax 0:c643d398cdb6 27
marcbax 0:c643d398cdb6 28 #ifndef PNM_UTILS_H
marcbax 0:c643d398cdb6 29 #define PNM_UTILS_H 1
marcbax 0:c643d398cdb6 30
marcbax 0:c643d398cdb6 31 #include <ChaN/ff.h>
marcbax 0:c643d398cdb6 32 #include <stdint.h>
marcbax 0:c643d398cdb6 33
marcbax 0:c643d398cdb6 34 enum {
marcbax 0:c643d398cdb6 35 PNM_BITMAP,
marcbax 0:c643d398cdb6 36 PNM_GREYSCALE,
marcbax 0:c643d398cdb6 37 PNM_UNKNOWN
marcbax 0:c643d398cdb6 38 };
marcbax 0:c643d398cdb6 39
marcbax 0:c643d398cdb6 40 struct pnm_header {
marcbax 0:c643d398cdb6 41 uint8_t type;
marcbax 0:c643d398cdb6 42 int width;
marcbax 0:c643d398cdb6 43 int height;
marcbax 0:c643d398cdb6 44 int max_gray;
marcbax 0:c643d398cdb6 45 };
marcbax 0:c643d398cdb6 46
marcbax 0:c643d398cdb6 47 #define pnm_read_int(_f) ({ \
marcbax 0:c643d398cdb6 48 int32_t _value; \
marcbax 0:c643d398cdb6 49 pnm_read_int32(_f, &_value); \
marcbax 0:c643d398cdb6 50 (int)_value; })
marcbax 0:c643d398cdb6 51
marcbax 0:c643d398cdb6 52 extern int pnm_read_header(FIL *pnm_file, struct pnm_header *hdr);
marcbax 0:c643d398cdb6 53 extern int pnm_read_int32(FIL *pnm_file, int32_t *value);
marcbax 0:c643d398cdb6 54
marcbax 0:c643d398cdb6 55 #endif /* PNM_UTILS_H */