freeRTOS操作系统机器人实现
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
3.0 KiB

3 days ago
/******************************************************************************
(C), 2018-2099, Radkil
******************************************************************************
: stmflash.h
: 稿
: Radkil
: 2026321
:
: stmflash.c
:
1. : 2026321
: Radkil
:
******************************************************************************/
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
#ifndef __STMFLASH_H__
#define __STMFLASH_H__
#ifdef __cplusplus
#if __cplusplus
extern "C"{
#endif
#endif /* __cplusplus */
/*==============================================*
* include header files *
*----------------------------------------------*/
#include "bsp_config.h"
#ifdef USE_ONCHIP_FLASH
#include <stdint.h>
#include "main.h"
/*==============================================*
* constants or macros define *
*----------------------------------------------*/
/*==============================================*
* project-wide global variables *
*----------------------------------------------*/
/*==============================================*
* routines' or functions' implementations *
*----------------------------------------------*/
uint8_t STMFLASH_ReadByte(uint32_t faddr);
void STMFLASH_Read(uint32_t ReadAddr, uint8_t *pBuffer, uint32_t NumToRead);
HAL_StatusTypeDef STMFLASH_EraseSector(uint8_t Sector_Num);
HAL_StatusTypeDef STMFLASH_EraseByAddress(uint32_t Address);
HAL_StatusTypeDef STMFLASH_Write(uint32_t WriteAddr, uint8_t *pBuffer, uint32_t NumToWrite);
HAL_StatusTypeDef STMFLASH_Write_NoCheck(uint32_t WriteAddr, uint8_t *pBuffer, uint32_t NumToWrite);
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* __cplusplus */
#endif /* __STMFLASH_H__ */