Error as described in MBs email to MS

Dependencies:   SDFileSystem app epson mbed msp430 pl tests

Committer:
marcbax
Date:
Thu Jan 11 13:42:27 2018 +0000
Revision:
0:c643d398cdb6
Marc Bax version 180111. It hangs on the WritePartImage in the RedrawAlphabet routine in hangman.cpp. Within that call it does execute Ypos(), but not Xpos().

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) 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 * epdpsu.h -- EPD PSU interface abstraction layer
marcbax 0:c643d398cdb6 21 *
marcbax 0:c643d398cdb6 22 * Authors:
marcbax 0:c643d398cdb6 23 * Guillaume Tucker <guillaume.tucker@plasticlogic.com>
marcbax 0:c643d398cdb6 24 *
marcbax 0:c643d398cdb6 25 */
marcbax 0:c643d398cdb6 26
marcbax 0:c643d398cdb6 27 #ifndef INCLUDE_PL_EPDPSU_H
marcbax 0:c643d398cdb6 28 #define INCLUDE_PL_EPDPSU_H 1
marcbax 0:c643d398cdb6 29
marcbax 0:c643d398cdb6 30 /**
marcbax 0:c643d398cdb6 31 @file pl/epdpsu.h
marcbax 0:c643d398cdb6 32
marcbax 0:c643d398cdb6 33 Abstract interface and generic implementation to the EPD PSU
marcbax 0:c643d398cdb6 34 */
marcbax 0:c643d398cdb6 35
marcbax 0:c643d398cdb6 36 /** Set to 1 to enable stub */
marcbax 0:c643d398cdb6 37 #define PL_EPDPSU_STUB 0
marcbax 0:c643d398cdb6 38
marcbax 0:c643d398cdb6 39 struct pl_epdc;
marcbax 0:c643d398cdb6 40
marcbax 0:c643d398cdb6 41 /** Interface */
marcbax 0:c643d398cdb6 42 struct pl_epdpsu {
marcbax 0:c643d398cdb6 43 /**
marcbax 0:c643d398cdb6 44 turn the EPD PSU on
marcbax 0:c643d398cdb6 45 @param[in] psu pl_epdpsu instance
marcbax 0:c643d398cdb6 46 @return -1 if an error occured, 0 otherwise
marcbax 0:c643d398cdb6 47 */
marcbax 0:c643d398cdb6 48 int (*on)(struct pl_epdpsu *psu);
marcbax 0:c643d398cdb6 49
marcbax 0:c643d398cdb6 50 /**
marcbax 0:c643d398cdb6 51 turn the EPD PSU off
marcbax 0:c643d398cdb6 52 @param[in] psu pl_epdpsu instance
marcbax 0:c643d398cdb6 53 @return -1 if an error occured, 0 otherwise
marcbax 0:c643d398cdb6 54 */
marcbax 0:c643d398cdb6 55 int (*off)(struct pl_epdpsu *psu);
marcbax 0:c643d398cdb6 56
marcbax 0:c643d398cdb6 57 int state; /**< current power state (1=on, 0=off) */
marcbax 0:c643d398cdb6 58 void *data; /**< private data for the implementation */
marcbax 0:c643d398cdb6 59 };
marcbax 0:c643d398cdb6 60
marcbax 0:c643d398cdb6 61 /** Generic GPIO-based implementation */
marcbax 0:c643d398cdb6 62 struct pl_epdpsu_gpio {
marcbax 0:c643d398cdb6 63 struct pl_gpio *gpio; /**< pl_gpio instance to control the GPIOs */
marcbax 0:c643d398cdb6 64 unsigned hv_en; /**< GPIO number to turn the power on/off */
marcbax 0:c643d398cdb6 65 unsigned com_close; /**< GPIO number to close the COM switch */
marcbax 0:c643d398cdb6 66 unsigned pok; /**< GPIO number to read Power OK */
marcbax 0:c643d398cdb6 67 unsigned flt; /**< GPIO number to read Power FLT status */
marcbax 0:c643d398cdb6 68 unsigned timeout_ms; /**< Maximum time in ms to wait for POK */
marcbax 0:c643d398cdb6 69 unsigned on_delay_ms; /**< Delay after turning the power on */
marcbax 0:c643d398cdb6 70 unsigned off_delay_ms;/**< Delay after turning the power off */
marcbax 0:c643d398cdb6 71 };
marcbax 0:c643d398cdb6 72
marcbax 0:c643d398cdb6 73 /**
marcbax 0:c643d398cdb6 74 Initialise a pl_epdpsu instance with generic GPIO-based implamentation.
marcbax 0:c643d398cdb6 75
marcbax 0:c643d398cdb6 76 Both the pl_epdpsu and pl_epdpsu_gpio structures need to be managed by the
marcbax 0:c643d398cdb6 77 caller, so they can be either on the heap or the caller's stack.
marcbax 0:c643d398cdb6 78
marcbax 0:c643d398cdb6 79 @param[in] psu pl_epdpsu instance
marcbax 0:c643d398cdb6 80 @param[in] p pl_epdpsu_gpio instance
marcbax 0:c643d398cdb6 81 @return -1 if an error occured, 0 otherwise
marcbax 0:c643d398cdb6 82 */
marcbax 0:c643d398cdb6 83 extern int pl_epdpsu_gpio_init(struct pl_epdpsu *psu,
marcbax 0:c643d398cdb6 84 struct pl_epdpsu_gpio *p);
marcbax 0:c643d398cdb6 85
marcbax 0:c643d398cdb6 86 /**
marcbax 0:c643d398cdb6 87 Initialise a pl_epdpsu instance to use the generic epdc->set_epd_power
marcbax 0:c643d398cdb6 88
marcbax 0:c643d398cdb6 89 @param[in] psu pl_epdpsu instance
marcbax 0:c643d398cdb6 90 @param[in] epdc pl_epdc instance
marcbax 0:c643d398cdb6 91 @return -1 if an error occured, 0 otherwise
marcbax 0:c643d398cdb6 92 */
marcbax 0:c643d398cdb6 93 extern int pl_epdpsu_epdc_init(struct pl_epdpsu *psu, struct pl_epdc *epdc);
marcbax 0:c643d398cdb6 94
marcbax 0:c643d398cdb6 95 #if PL_EPDPSU_STUB
marcbax 0:c643d398cdb6 96 /** Initialise an pl_epdpsu instance with stub implementation.
marcbax 0:c643d398cdb6 97
marcbax 0:c643d398cdb6 98 This is especially useful with automatic power control or for debugging.
marcbax 0:c643d398cdb6 99
marcbax 0:c643d398cdb6 100 @param[in] psu pl_epdpsu instance
marcbax 0:c643d398cdb6 101 @return 0 unless something went really wrong
marcbax 0:c643d398cdb6 102 */
marcbax 0:c643d398cdb6 103 extern int pl_epdpsu_stub_init(struct pl_epdpsu *psu);
marcbax 0:c643d398cdb6 104 #endif
marcbax 0:c643d398cdb6 105
marcbax 0:c643d398cdb6 106 #endif /* INCLUDE_PL_EPDPSU_H */