growing leaf (6 frames) and reverse

Dependencies:   Adafruit_GFX_i2c BLE_API USBDevice mbed

Fork of mbed-os-example-mbed5-blinky by mbed-os-examples

Committer:
SamShiSS
Date:
Tue Jul 18 16:39:46 2017 +0000
Revision:
32:114e947a916b
unyte logo animation

Who changed what in which revision?

UserRevisionLine numberNew contents of line
SamShiSS 32:114e947a916b 1 /*******************************************************************************
SamShiSS 32:114e947a916b 2 * Copyright (C) 2014 Maxim Integrated Products, Inc., All Rights Reserved.
SamShiSS 32:114e947a916b 3 *
SamShiSS 32:114e947a916b 4 * Permission is hereby granted, free of charge, to any person obtaining a
SamShiSS 32:114e947a916b 5 * copy of this software and associated documentation files (the "Software"),
SamShiSS 32:114e947a916b 6 * to deal in the Software without restriction, including without limitation
SamShiSS 32:114e947a916b 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
SamShiSS 32:114e947a916b 8 * and/or sell copies of the Software, and to permit persons to whom the
SamShiSS 32:114e947a916b 9 * Software is furnished to do so, subject to the following conditions:
SamShiSS 32:114e947a916b 10 *
SamShiSS 32:114e947a916b 11 * The above copyright notice and this permission notice shall be included
SamShiSS 32:114e947a916b 12 * in all copies or substantial portions of the Software.
SamShiSS 32:114e947a916b 13 *
SamShiSS 32:114e947a916b 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
SamShiSS 32:114e947a916b 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
SamShiSS 32:114e947a916b 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
SamShiSS 32:114e947a916b 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
SamShiSS 32:114e947a916b 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
SamShiSS 32:114e947a916b 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
SamShiSS 32:114e947a916b 20 * OTHER DEALINGS IN THE SOFTWARE.
SamShiSS 32:114e947a916b 21 *
SamShiSS 32:114e947a916b 22 * Except as contained in this notice, the name of Maxim Integrated
SamShiSS 32:114e947a916b 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
SamShiSS 32:114e947a916b 24 * Products, Inc. Branding Policy.
SamShiSS 32:114e947a916b 25 *
SamShiSS 32:114e947a916b 26 * The mere transfer of this software does not imply any licenses
SamShiSS 32:114e947a916b 27 * of trade secrets, proprietary technology, copyrights, patents,
SamShiSS 32:114e947a916b 28 * trademarks, maskwork rights, or any other form of intellectual
SamShiSS 32:114e947a916b 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
SamShiSS 32:114e947a916b 30 * ownership rights.
SamShiSS 32:114e947a916b 31 *******************************************************************************
SamShiSS 32:114e947a916b 32 */
SamShiSS 32:114e947a916b 33
SamShiSS 32:114e947a916b 34 /* $Revision: 2905 $ $Date: 2014-08-05 17:18:09 -0500 (Tue, 05 Aug 2014) $ */
SamShiSS 32:114e947a916b 35
SamShiSS 32:114e947a916b 36 #ifndef _FLASH_H
SamShiSS 32:114e947a916b 37 #define _FLASH_H
SamShiSS 32:114e947a916b 38
SamShiSS 32:114e947a916b 39 #ifdef __cplusplus
SamShiSS 32:114e947a916b 40 extern "C" {
SamShiSS 32:114e947a916b 41 #endif
SamShiSS 32:114e947a916b 42
SamShiSS 32:114e947a916b 43 #include "flc_regs.h"
SamShiSS 32:114e947a916b 44
SamShiSS 32:114e947a916b 45 /**
SamShiSS 32:114e947a916b 46 * @file flc.h
SamShiSS 32:114e947a916b 47 * @addtogroup flash Flash Controller
SamShiSS 32:114e947a916b 48 * @{
SamShiSS 32:114e947a916b 49 * @brief This is the high level API for the internal flash controller module
SamShiSS 32:114e947a916b 50 * of the MAX32600 family of ARM Cortex based embedded microcontrollers.
SamShiSS 32:114e947a916b 51 */
SamShiSS 32:114e947a916b 52
SamShiSS 32:114e947a916b 53 /**
SamShiSS 32:114e947a916b 54 * @brief This function will erase a single page of flash, 1 page is
SamShiSS 32:114e947a916b 55 * 2K bytes. Keys needed for flash are in the hardware specific
SamShiSS 32:114e947a916b 56 * register file "flc_regs.h"
SamShiSS 32:114e947a916b 57 *
SamShiSS 32:114e947a916b 58 * @param address Start address that needs to be erased, must be aligned with 0x800
SamShiSS 32:114e947a916b 59 * @param erase_code Flash erase code; defined as 'MXC_V_FLC_ERASE_CODE_PAGE_ERASE' for page erase
SamShiSS 32:114e947a916b 60 * @param unlock_key Key necessary for accessing flash; defined as 'MXC_V_FLC_FLSH_UNLOCK_KEY'
SamShiSS 32:114e947a916b 61 *
SamShiSS 32:114e947a916b 62 * @return 0 => Success. Non zero => error condition.
SamShiSS 32:114e947a916b 63 */
SamShiSS 32:114e947a916b 64 int32_t FLC_Erase(uint32_t address, uint8_t erase_code, uint8_t unlock_key);
SamShiSS 32:114e947a916b 65
SamShiSS 32:114e947a916b 66 /**
SamShiSS 32:114e947a916b 67 * @brief This function writes data to the flash device through flash controller
SamShiSS 32:114e947a916b 68 *
SamShiSS 32:114e947a916b 69 * @param address Start address that needs to be written, must be aligned with 4 bytes
SamShiSS 32:114e947a916b 70 * @param data Pointer to the buffer containing data to write
SamShiSS 32:114e947a916b 71 * @param length Size of the data to write in bytes, must be multiple of 4 bytes
SamShiSS 32:114e947a916b 72 * @param unlock_key Key necessary for accessing flash; defined as 'MXC_V_FLC_FLSH_UNLOCK_KEY'
SamShiSS 32:114e947a916b 73 *
SamShiSS 32:114e947a916b 74 * @return 0 => Success. Non zero => error condition.
SamShiSS 32:114e947a916b 75 */
SamShiSS 32:114e947a916b 76 int32_t FLC_WriteBlock(uint32_t address, const void *data, uint32_t length, uint8_t unlock_key);
SamShiSS 32:114e947a916b 77
SamShiSS 32:114e947a916b 78 /**
SamShiSS 32:114e947a916b 79 * @}
SamShiSS 32:114e947a916b 80 */
SamShiSS 32:114e947a916b 81 #ifdef __cplusplus
SamShiSS 32:114e947a916b 82 }
SamShiSS 32:114e947a916b 83 #endif
SamShiSS 32:114e947a916b 84
SamShiSS 32:114e947a916b 85 #endif
SamShiSS 32:114e947a916b 86