標題:
STM8讀取Flash_eeprom程序
[打印本頁]
作者:
weixingcui
時間:
2018-5-29 10:03
標題:
STM8讀取Flash_eeprom程序
STM8讀取Flash_eeprom單片機源程序如下:
/******************** (C) COPYRIGHT 風馳iCreate嵌入式開發(fā)工作室 ********************
* 文件名 :main.c
* 描述 :Flash_eeprom讀寫實驗
* 實驗平臺:iCreate STM8開發(fā)板
* 庫版本 :V2.0.0
* 作者 :ling_guansheng
**********************************************************************************/
/* Includes ------------------------------------------------------------------*/
/* Includes ------------------------------------------------------------------*/
#include "stm8s.h"
#include "stm8s_clk.h"
#include "intrinsics.h"
#include "stm8s_uart1.h"
#include "uart.h"
#include "flash_eeprom.h"
void Delay(u16 nCount);
/* Private defines -----------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
int main(void)
{
/* Infinite loop */
/*設置內(nèi)部時鐘16M為主時鐘*/
Flash_eeprom_readwrite_Init();
/*!<Set High speed internal clock */
CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV1);
Uart_Init();
Flash_eeprom_readwrite_Test();
Flash_eeprom_Erase_Test();
__enable_interrupt();
while (1);
}
void Delay(u16 nCount)
{
/* Decrement nCount value */
while (nCount != 0)
{
nCount--;
}
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval : None
*/
void assert_failed(u8* file, u32 line)
{
/* User can add his own implementation to report the file name and line number,
……………………
…………限于本文篇幅 余下代碼請從51黑下載附件…………
復制代碼
所有資料51hei提供下載:
STM8Flash_eeprom.rar
(246.27 KB, 下載次數(shù): 41)
2018-5-29 10:03 上傳
點擊文件名下載附件
STM8讀取Flash_eeprom程序
下載積分: 黑幣 -5
歡迎光臨 (http://www.torrancerestoration.com/bbs/)
Powered by Discuz! X3.1