1*1ca3442bSMatthias Ringwald /* 2*1ca3442bSMatthias Ringwald * Copyright (C) 2014 BlueKitchen GmbH 3*1ca3442bSMatthias Ringwald * 4*1ca3442bSMatthias Ringwald * Redistribution and use in source and binary forms, with or without 5*1ca3442bSMatthias Ringwald * modification, are permitted provided that the following conditions 6*1ca3442bSMatthias Ringwald * are met: 7*1ca3442bSMatthias Ringwald * 8*1ca3442bSMatthias Ringwald * 1. Redistributions of source code must retain the above copyright 9*1ca3442bSMatthias Ringwald * notice, this list of conditions and the following disclaimer. 10*1ca3442bSMatthias Ringwald * 2. Redistributions in binary form must reproduce the above copyright 11*1ca3442bSMatthias Ringwald * notice, this list of conditions and the following disclaimer in the 12*1ca3442bSMatthias Ringwald * documentation and/or other materials provided with the distribution. 13*1ca3442bSMatthias Ringwald * 3. Neither the name of the copyright holders nor the names of 14*1ca3442bSMatthias Ringwald * contributors may be used to endorse or promote products derived 15*1ca3442bSMatthias Ringwald * from this software without specific prior written permission. 16*1ca3442bSMatthias Ringwald * 4. Any redistribution, use, or modification is done solely for 17*1ca3442bSMatthias Ringwald * personal benefit and not for any commercial purpose or for 18*1ca3442bSMatthias Ringwald * monetary gain. 19*1ca3442bSMatthias Ringwald * 20*1ca3442bSMatthias Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21*1ca3442bSMatthias Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22*1ca3442bSMatthias Ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23*1ca3442bSMatthias Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 24*1ca3442bSMatthias Ringwald * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25*1ca3442bSMatthias Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26*1ca3442bSMatthias Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27*1ca3442bSMatthias Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28*1ca3442bSMatthias Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29*1ca3442bSMatthias Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30*1ca3442bSMatthias Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31*1ca3442bSMatthias Ringwald * SUCH DAMAGE. 32*1ca3442bSMatthias Ringwald * 33*1ca3442bSMatthias Ringwald * Please inquire about commercial licensing options at 34*1ca3442bSMatthias Ringwald * [email protected] 35*1ca3442bSMatthias Ringwald * 36*1ca3442bSMatthias Ringwald */ 37*1ca3442bSMatthias Ringwald 38*1ca3442bSMatthias Ringwald /** 39*1ca3442bSMatthias Ringwald * various functions to deal with flaws and portability issues 40*1ca3442bSMatthias Ringwald */ 41*1ca3442bSMatthias Ringwald 42*1ca3442bSMatthias Ringwald // mspgcc LTS doesn't support 20-bit pointer yet -> put const data into .fartext 43*1ca3442bSMatthias Ringwald 44*1ca3442bSMatthias Ringwald #ifndef __HAL_COMPAT_H 45*1ca3442bSMatthias Ringwald #define __HAL_COMPAT_H 46*1ca3442bSMatthias Ringwald 47*1ca3442bSMatthias Ringwald #include <stdint.h> 48*1ca3442bSMatthias Ringwald 49*1ca3442bSMatthias Ringwald void waitAboutOneSecond(void); 50*1ca3442bSMatthias Ringwald 51*1ca3442bSMatthias Ringwald // single byte read 52*1ca3442bSMatthias Ringwald uint8_t FlashReadByte (uint32_t addr); 53*1ca3442bSMatthias Ringwald 54*1ca3442bSMatthias Ringwald // argument order matches memcpy 55*1ca3442bSMatthias Ringwald void FlashReadBlock(uint8_t *buffer, uint32_t addr, uint16_t len); 56*1ca3442bSMatthias Ringwald 57*1ca3442bSMatthias Ringwald 58*1ca3442bSMatthias Ringwald 59*1ca3442bSMatthias Ringwald #endif // __HAL_COMPAT_H 60