first submission

This commit is contained in:
qiyongshuang
2023-02-01 14:19:13 +08:00
parent d534aad004
commit b79c6ac80d
3711 changed files with 745432 additions and 2 deletions
@@ -0,0 +1,37 @@
/********************************** (C) COPYRIGHT *******************************
* File Name : Internal_Flash.h
* Author : WCH
* Version : V1.0.0
* Date : 2022/08/08
* Description : header file for Internal_Flash.c
*********************************************************************************
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
* Attention: This software (modified or not) and binary are used for
* microcontroller manufactured by Nanjing Qinheng Microelectronics.
*******************************************************************************/
#ifndef USER_INTERNAL__FLASH_C_
#define USER_INTERNAL__FLASH_C_
#ifdef __cplusplus
extern "C" {
#endif
#include "stdint.h"
#define INTERNAL_FLASH_PAGE_SIZE 256
#define IFLASH_UDISK_START_ADDR 0x5000 // 20K
#if defined (CH32V20x_D6)
#define IFLASH_UDISK_END_ADDR 0x37FFF
#else
#define IFLASH_UDISK_END_ADDR 0x77FFF
#endif
#define IFLASH_UDISK_SIZE (IFLASH_UDISK_END_ADDR - IFLASH_UDISK_START_ADDR + 1 )
extern void IFlash_Prog_512(uint32_t address,uint32_t *pbuf);
#ifdef __cplusplus
}
#endif
#endif /* USER_INTERNAL__FLASH_C_ */