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