-
大小: 611KB文件類型: .rar金幣: 2下載: 0 次發布日期: 2021-05-05
- 語言: 其他
- 標簽: nRF24LE1??bootloader??
資源簡介
nRF24LE1 firmware update over-the-air

代碼片段和文件信息
/*?Copyright?(c)?2009?Nordic?Semiconductor.?All?Rights?Reserved.
?*
?*?The?information?contained?herein?is?confidential?property?of?Nordic?
?*?Semiconductor?ASA.Terms?and?conditions?of?usage?are?described?in?detail?
?*?in?NORDIC?SEMICONDUCTOR?STANDARD?SOFTWARE?LICENSE?AGREEMENT.?
?*
?*?Licensees?are?granted?free?non-transferable?use?of?the?information.?NO
?*?WARRENTY?of?ANY?KIND?is?provided.?This?heading?must?NOT?be?removed?from
?*?the?file.
?*??????????????
?*?$LastChangedRevision:?133?$
?*/?
/**?@file
?*@brief?Implementation?of?hal_flash
?*/
#include?“nrf24le1.h“
#include?“hal_flash.h“
void?hal_flash_page_erase(uint8_t?pn)
{?
??//?Save?interrupt?enable?state?and?disable?interrupts:
??F0?=?EA;
??EA?=?0;
??//?Enable?flash?write?operation:
??WEN?=?1;
?
??//?Write?the?page?address?to?FCR?to?start?the?page?erase?operation.?This
??//?operation?is?“self?timed“?when?executing?from?the?flash;?the?CPU?will
??//?halt?until?the?operation?is?finished:
??FCR?=?pn;
??//?When?running?from?XDATA?RAM?we?need?to?wait?for?the?operation?to?finish:
??while(RDYN?==?1)
????;
??WEN?=?0;
??
??EA?=?F0;?//?Restore?interrupt?enable?state??
}
void?hal_flash_byte_write(uint16_t?a?uint8_t?b)
{
??static?uint8_t?xdata?*pb;
????
??//?Save?interrupt?enable?state?and?disable?interrupts:
??F0?=?EA;
??EA?=?0;
??
??//?Enable?flash?write?operation:
??WEN?=?1;
??
??//?Write?the?byte?directly?to?the?flash.?This?operation?is?“self?timed“?when
??//?executing?from?the?flash;?the?CPU?will?halt?until?the?operation?is
??//?finished:
??pb?=?(uint8_t?xdata?*)a;
??*pb?=?b;?//lint?-e613?“Null?pointer?ok?here“
??//?When?running?from?XDATA?RAM?we?need?to?wait?for?the?operation?to?finish:
??while(RDYN?==?1)
????;
??WEN?=?0;
??EA?=?F0;?//?Restore?interrupt?enable?state
}
void?hal_flash_bytes_write(uint16_t?a?const?uint8_t?*p?uint16_t?n)
{
??static?uint8_t?xdata?*pb;
??//?Save?interrupt?enable?state?and?disable?interrupts:
??F0?=?EA;
??EA?=?0;
??//?Enable?flash?write?operation:
??WEN?=?1;
??//?Write?the?bytes?directly?to?the?flash.?This?operation?is
??//?“self?timed“;?the?CPU?will?halt?until?the?operation?is
??//?finished:
??pb?=?(uint8_t?xdata?*)a;
??while(n--)
??{
????*pb++?=?*p++;
????//
????//?When?running?from?XDATA?RAM?we?need?to?wait?for?the?operation?to
????//?finish:
????while(RDYN?==?1)
??????;
??}
??WEN?=?0;
??EA?=?F0;?//?Restore?interrupt?enable?state
}
uint8_t?hal_flash_byte_read(uint16_t?a)
{
??uint8_t?xdata?*pb?=?(uint8_t?xdata?*)a;
??return?*pb;
}
void?hal_flash_bytes_read(uint16_t?a?uint8_t?*p?uint16_t?n)
{??
??uint8_t?xdata?*pb?=?(uint8_t?xdata?*)a;
??while(n--)
??{
????*p?=?*pb;
????pb++;
????p++;
??}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
????.......?????74242??2013-04-26?19:18??nAN-18\firmware\bootloader_nRF24LE1\bootloader.uvgui.Administrator
????.......?????70912??2012-06-19?21:13??nAN-18\firmware\bootloader_nRF24LE1\bootloader.uvgui_Administrator.bak
????.......??????7698??2013-04-26?19:18??nAN-18\firmware\bootloader_nRF24LE1\bootloader.uvopt
?????文件??????14649??2011-07-28?10:26??nAN-18\firmware\bootloader_nRF24LE1\bootloader.uvproj
????.......??????7698??2012-06-19?21:13??nAN-18\firmware\bootloader_nRF24LE1\bootloader_uvopt.bak
?????文件????????219??2013-04-26?19:18??nAN-18\firmware\bootloader_nRF24LE1\build\bootloader.plg
?????文件???????2754??2011-03-14?16:18??nAN-18\firmware\bootloader_nRF24LE1\hal_flash.c
?????文件???????2326??2011-03-14?16:18??nAN-18\firmware\bootloader_nRF24LE1\hal_flash.h
?????文件???????1681??2011-03-14?16:18??nAN-18\firmware\bootloader_nRF24LE1\hal_flash_hw.h
?????文件??????14157??2011-09-01?15:30??nAN-18\firmware\bootloader_nRF24LE1\main.c
?????文件???????4027??2011-09-01?15:30??nAN-18\firmware\bootloader_nRF24LE1\main.h
?????文件???????6376??2011-07-28?10:26??nAN-18\firmware\bootloader_nRF24LE1\STARTUP.A51
?????文件???????2127??2011-09-01?15:30??nAN-18\firmware\common\protocol.h
?????文件????????302??2011-07-28?10:26??nAN-18\firmware\precompiled_hex_examples\demo1_led.hex
?????文件????????177??2011-07-28?10:26??nAN-18\firmware\precompiled_hex_examples\demo2_led.hex
?????文件??????36171??2011-07-28?10:26??nAN-18\firmware\precompiled_hex_examples\large_gazell_configuration_tool.hex
?????文件??????17582??2011-07-28?10:26??nAN-18\firmware\precompiled_hex_examples\medium_gzll_device_nrf24le1.hex
?????文件???????1531??2011-07-28?10:26??nAN-18\firmware\precompiled_hex_examples\rfflashdemo.hex
?????文件???????1394??2011-07-28?10:26??nAN-18\firmware\precompiled_hex_examples\small_shock_ptx_nrf24le1.hex
?????文件????????248??2011-07-28?10:26??nAN-18\firmware\README.txt
?????文件?????615890??2011-09-08?09:16??nAN-18\nAN-18?Application?Note?v1.0.pdf
?????文件???????7844??2011-09-08?12:44??nAN-18\precompiled_hex\nrf24le1_boot_loader.hex
?????目錄??????????0??2012-08-17?11:31??nAN-18\firmware\bootloader_nRF24LE1\build
?????目錄??????????0??2012-08-17?11:31??nAN-18\firmware\bootloader_nRF24LE1\list
?????目錄??????????0??2013-04-26?19:18??nAN-18\firmware\bootloader_nRF24LE1
?????目錄??????????0??2012-08-17?11:31??nAN-18\firmware\common
?????目錄??????????0??2012-08-17?11:31??nAN-18\firmware\precompiled_hex_examples
?????目錄??????????0??2012-08-17?11:31??nAN-18\firmware
?????目錄??????????0??2012-08-17?11:31??nAN-18\precompiled_hex
?????目錄??????????0??2012-08-17?11:31??nAN-18
............此處省略3個文件信息
- 上一篇:呼叫中心tw等文件播放器
- 下一篇:學生綜合素質評價系統
評論
共有 條評論