mirror of
https://github.com/cwyark/sdk-ameba-v4.0b_without_nda_gcc.git
synced 2024-11-22 05:54:19 +00:00
176 lines
18 KiB
HTML
176 lines
18 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.11"/>
|
|
<title>SDK4.0: flash_api.h File Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { init_search(); });
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">SDK4.0
|
|
</div>
|
|
<div id="projectbrief">This document shows Ameba SDK 4.0 APIs</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.11 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_59865070466a2d887ccae359ce349522.html">sdk-ameba</a></li><li class="navelem"><a class="el" href="dir_bb17c7c1f6b5d4e42018e46e245402cf.html">project</a></li><li class="navelem"><a class="el" href="dir_4d8a5561b87cbdbe66a2580ebcb931d0.html">realtek_8195a_gen_project</a></li><li class="navelem"><a class="el" href="dir_d55a6639c0ef2e769c54f3d73fdcd6ae.html">rtl8195a</a></li><li class="navelem"><a class="el" href="dir_218701c72f38a637f56ccea9eb201b28.html">sw</a></li><li class="navelem"><a class="el" href="dir_467016183711ec67a0924a03f0be9cbd.html">lib</a></li><li class="navelem"><a class="el" href="dir_91cf82b8388ba308ddfe17c7b1476a41.html">sw_lib</a></li><li class="navelem"><a class="el" href="dir_d752387d37b25b2ddfb0bd02d399f93a.html">mbed</a></li><li class="navelem"><a class="el" href="dir_adf298d7cff763ecf28c97eaa1fb8ba3.html">hal_ext</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">flash_api.h File Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>This file provides mbed FLASH API.
|
|
<a href="#details">More...</a></p>
|
|
<div class="textblock"><code>#include "device.h"</code><br />
|
|
</div><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr><td colspan="2"><div class="groupHeader">AmebaZ Only</div></td></tr>
|
|
<tr class="memitem:ga95d0a0924c4be8345169940bf90ed321"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#ga95d0a0924c4be8345169940bf90ed321">flash_erase_chip</a> (flash_t *obj)</td></tr>
|
|
<tr class="memdesc:ga95d0a0924c4be8345169940bf90ed321"><td class="mdescLeft"> </td><td class="mdescRight">Erase the whole flash chip. <a href="group__flash.html#ga95d0a0924c4be8345169940bf90ed321">More...</a><br /></td></tr>
|
|
<tr class="separator:ga95d0a0924c4be8345169940bf90ed321"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
|
|
Ameba Common</h2></td></tr>
|
|
<tr class="memitem:ga4b9cefba5eb591210b43ce2f31145784"><td class="memItemLeft" align="right" valign="top">
|
|
typedef struct flash_s </td><td class="memItemRight" valign="bottom"><b>flash_t</b></td></tr>
|
|
<tr class="separator:ga4b9cefba5eb591210b43ce2f31145784"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gae99567fff68ce173f22692b16255ac95"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#gae99567fff68ce173f22692b16255ac95">flash_erase_sector</a> (flash_t *obj, uint32_t address)</td></tr>
|
|
<tr class="memdesc:gae99567fff68ce173f22692b16255ac95"><td class="mdescLeft"> </td><td class="mdescRight">Erase flash sector. <a href="group__flash.html#gae99567fff68ce173f22692b16255ac95">More...</a><br /></td></tr>
|
|
<tr class="separator:gae99567fff68ce173f22692b16255ac95"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gad18bac4a83b344c97c44bc527dd27c33"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#gad18bac4a83b344c97c44bc527dd27c33">flash_erase_block</a> (flash_t *obj, uint32_t address)</td></tr>
|
|
<tr class="memdesc:gad18bac4a83b344c97c44bc527dd27c33"><td class="mdescLeft"> </td><td class="mdescRight">Erase flash block(64KB) <a href="group__flash.html#gad18bac4a83b344c97c44bc527dd27c33">More...</a><br /></td></tr>
|
|
<tr class="separator:gad18bac4a83b344c97c44bc527dd27c33"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gad5e4c414bb37e27b30bf846b6a174bec"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#gad5e4c414bb37e27b30bf846b6a174bec">flash_read_word</a> (flash_t *obj, uint32_t address, uint32_t *data)</td></tr>
|
|
<tr class="memdesc:gad5e4c414bb37e27b30bf846b6a174bec"><td class="mdescLeft"> </td><td class="mdescRight">Read a word from specified address. <a href="group__flash.html#gad5e4c414bb37e27b30bf846b6a174bec">More...</a><br /></td></tr>
|
|
<tr class="separator:gad5e4c414bb37e27b30bf846b6a174bec"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaef8b6bb9e52c26badfb9f8c644cf2633"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#gaef8b6bb9e52c26badfb9f8c644cf2633">flash_write_word</a> (flash_t *obj, uint32_t address, uint32_t data)</td></tr>
|
|
<tr class="memdesc:gaef8b6bb9e52c26badfb9f8c644cf2633"><td class="mdescLeft"> </td><td class="mdescRight">Write a word to specified address. <a href="group__flash.html#gaef8b6bb9e52c26badfb9f8c644cf2633">More...</a><br /></td></tr>
|
|
<tr class="separator:gaef8b6bb9e52c26badfb9f8c644cf2633"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gac1b58fa05ce302a10f7ce9ba6524c169"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#gac1b58fa05ce302a10f7ce9ba6524c169">flash_stream_read</a> (flash_t *obj, uint32_t address, uint32_t len, uint8_t *data)</td></tr>
|
|
<tr class="memdesc:gac1b58fa05ce302a10f7ce9ba6524c169"><td class="mdescLeft"> </td><td class="mdescRight">Read a stream of data from specified address. <a href="group__flash.html#gac1b58fa05ce302a10f7ce9ba6524c169">More...</a><br /></td></tr>
|
|
<tr class="separator:gac1b58fa05ce302a10f7ce9ba6524c169"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga025166692c958e48e2ef824c371b722b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#ga025166692c958e48e2ef824c371b722b">flash_stream_write</a> (flash_t *obj, uint32_t address, uint32_t len, uint8_t *data)</td></tr>
|
|
<tr class="memdesc:ga025166692c958e48e2ef824c371b722b"><td class="mdescLeft"> </td><td class="mdescRight">Write a stream of data to specified address. <a href="group__flash.html#ga025166692c958e48e2ef824c371b722b">More...</a><br /></td></tr>
|
|
<tr class="separator:ga025166692c958e48e2ef824c371b722b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gadac33ed905a07a2cb15746cd9b4e08d3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#gadac33ed905a07a2cb15746cd9b4e08d3">flash_write_protect</a> (flash_t *obj, uint32_t protect)</td></tr>
|
|
<tr class="memdesc:gadac33ed905a07a2cb15746cd9b4e08d3"><td class="mdescLeft"> </td><td class="mdescRight">Control the flash chip write protect enable/disable. <a href="group__flash.html#gadac33ed905a07a2cb15746cd9b4e08d3">More...</a><br /></td></tr>
|
|
<tr class="separator:gadac33ed905a07a2cb15746cd9b4e08d3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga1c5ccb2f6a0f9cec2dc139894ecb24ec"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#ga1c5ccb2f6a0f9cec2dc139894ecb24ec">flash_get_status</a> (flash_t *obj)</td></tr>
|
|
<tr class="memdesc:ga1c5ccb2f6a0f9cec2dc139894ecb24ec"><td class="mdescLeft"> </td><td class="mdescRight">Get the value of status register1. <a href="group__flash.html#ga1c5ccb2f6a0f9cec2dc139894ecb24ec">More...</a><br /></td></tr>
|
|
<tr class="separator:ga1c5ccb2f6a0f9cec2dc139894ecb24ec"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga8a41e95c78069e69c1cd4a1ebd83de6e"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#ga8a41e95c78069e69c1cd4a1ebd83de6e">flash_set_status</a> (flash_t *obj, uint32_t data)</td></tr>
|
|
<tr class="memdesc:ga8a41e95c78069e69c1cd4a1ebd83de6e"><td class="mdescLeft"> </td><td class="mdescRight">Set Status register to enable desired operation. <a href="group__flash.html#ga8a41e95c78069e69c1cd4a1ebd83de6e">More...</a><br /></td></tr>
|
|
<tr class="separator:ga8a41e95c78069e69c1cd4a1ebd83de6e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gad990aea38eef9a60af5fb6f2657b7c4a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#gad990aea38eef9a60af5fb6f2657b7c4a">flash_reset_status</a> (flash_t *obj)</td></tr>
|
|
<tr class="memdesc:gad990aea38eef9a60af5fb6f2657b7c4a"><td class="mdescLeft"> </td><td class="mdescRight">This function aims to reset the status register, please make sure the operation is appropriate. <a href="group__flash.html#gad990aea38eef9a60af5fb6f2657b7c4a">More...</a><br /></td></tr>
|
|
<tr class="separator:gad990aea38eef9a60af5fb6f2657b7c4a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga9be5e145f4d318d6672de6943e766829"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#ga9be5e145f4d318d6672de6943e766829">flash_burst_write</a> (flash_t *obj, uint32_t address, uint32_t Length, uint8_t *data)</td></tr>
|
|
<tr class="memdesc:ga9be5e145f4d318d6672de6943e766829"><td class="mdescLeft"> </td><td class="mdescRight">It is the same with flash_stream_write function which is used to write a stream of data to specified address. <a href="group__flash.html#ga9be5e145f4d318d6672de6943e766829">More...</a><br /></td></tr>
|
|
<tr class="separator:ga9be5e145f4d318d6672de6943e766829"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga592e3960781eca38eae47db9b28df223"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#ga592e3960781eca38eae47db9b28df223">flash_burst_read</a> (flash_t *obj, uint32_t address, uint32_t Length, uint8_t *data)</td></tr>
|
|
<tr class="memdesc:ga592e3960781eca38eae47db9b28df223"><td class="mdescLeft"> </td><td class="mdescRight">It is the same with flash_stream_read function which is used to read a stream of data from specified address. <a href="group__flash.html#ga592e3960781eca38eae47db9b28df223">More...</a><br /></td></tr>
|
|
<tr class="separator:ga592e3960781eca38eae47db9b28df223"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga4fed0728cd2ad93b8eb8e4418fda0c22"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#ga4fed0728cd2ad93b8eb8e4418fda0c22">flash_set_extend_addr</a> (flash_t *obj, uint32_t data)</td></tr>
|
|
<tr class="memdesc:ga4fed0728cd2ad93b8eb8e4418fda0c22"><td class="mdescLeft"> </td><td class="mdescRight">This function is only for Micron 128MB flash to access beyond 16MB by switching between eight 16MB-area(segment). Please refer to flash datasheet for more information about memory mapping. <a href="group__flash.html#ga4fed0728cd2ad93b8eb8e4418fda0c22">More...</a><br /></td></tr>
|
|
<tr class="separator:ga4fed0728cd2ad93b8eb8e4418fda0c22"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga029b2c59c24bf1733be9a1b5c2c63160"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#ga029b2c59c24bf1733be9a1b5c2c63160">flash_get_extend_addr</a> (flash_t *obj)</td></tr>
|
|
<tr class="memdesc:ga029b2c59c24bf1733be9a1b5c2c63160"><td class="mdescLeft"> </td><td class="mdescRight">This function is only for Micron 128MB flash to read from Extended Address Register, which shows the current segment. Please refer to flash datasheet for more information about memory mapping. <a href="group__flash.html#ga029b2c59c24bf1733be9a1b5c2c63160">More...</a><br /></td></tr>
|
|
<tr class="separator:ga029b2c59c24bf1733be9a1b5c2c63160"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga053004871fb4a0f1ca3204cd7cc72177"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#ga053004871fb4a0f1ca3204cd7cc72177">flash_read_id</a> (flash_t *obj, uint8_t *buf, uint8_t len)</td></tr>
|
|
<tr class="memdesc:ga053004871fb4a0f1ca3204cd7cc72177"><td class="mdescLeft"> </td><td class="mdescRight">Get flash ID (command: 0x9F). <a href="group__flash.html#ga053004871fb4a0f1ca3204cd7cc72177">More...</a><br /></td></tr>
|
|
<tr class="separator:ga053004871fb4a0f1ca3204cd7cc72177"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga50ab8970fa850369baa6065a29e0f3b9"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flash.html#ga50ab8970fa850369baa6065a29e0f3b9">flash_read_unique_id</a> (flash_t *obj, uint8_t *buf, uint8_t len)</td></tr>
|
|
<tr class="memdesc:ga50ab8970fa850369baa6065a29e0f3b9"><td class="mdescLeft"> </td><td class="mdescRight">This function is only for Winbond flash to get unique ID (command: 0x4B). <a href="group__flash.html#ga50ab8970fa850369baa6065a29e0f3b9">More...</a><br /></td></tr>
|
|
<tr class="separator:ga50ab8970fa850369baa6065a29e0f3b9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>This file provides mbed FLASH API. </p>
|
|
<p>mbed Microcontroller Library</p>
|
|
<dl class="section author"><dt>Author</dt><dd></dd></dl>
|
|
<dl class="section version"><dt>Version</dt><dd>V1.0.0 </dd></dl>
|
|
<dl class="section attention"><dt>Attention</dt><dd></dd></dl>
|
|
<p>Copyright (c) 2006-2013 ARM Limited</p>
|
|
<p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at </p><pre class="fragment">http://www.apache.org/licenses/LICENSE-2.0
|
|
</pre><p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </p>
|
|
</div></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.11
|
|
</small></address>
|
|
</body>
|
|
</html>
|