mirror of
https://github.com/pvvx/RTL00_WEB.git
synced 2026-07-05 19:05:39 +00:00
update
This commit is contained in:
parent
34d3652711
commit
39f77eb92b
1844 changed files with 899433 additions and 7 deletions
55
USDK/component/common/mbed/hal_ext/flash_api.h
Normal file
55
USDK/component/common/mbed/hal_ext/flash_api.h
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
/* mbed Microcontroller Library
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
#ifndef MBED_EXT_FLASH_API_EXT_H
|
||||
#define MBED_EXT_FLASH_API_EXT_H
|
||||
|
||||
#include "device.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct flash_s flash_t;
|
||||
|
||||
/**
|
||||
* global data structure
|
||||
*/
|
||||
extern flash_t flashobj;
|
||||
extern bool fspic_isinit;
|
||||
|
||||
enum {
|
||||
FLASH_COMPLETE = 0,
|
||||
FLASH_ERROR_2 = 1,
|
||||
};
|
||||
|
||||
void flash_turnon (void);
|
||||
void flash_init (flash_t *obj);
|
||||
void flash_erase_sector (flash_t *obj, uint32_t address);
|
||||
void flash_erase_block (flash_t *obj, uint32_t address);
|
||||
int flash_read_word (flash_t *obj, uint32_t address, uint32_t * data);
|
||||
int flash_write_word (flash_t *obj, uint32_t address, uint32_t data);
|
||||
int flash_stream_read (flash_t *obj, uint32_t address, uint32_t len, uint8_t * data);
|
||||
int flash_stream_write (flash_t *obj, uint32_t address, uint32_t len, uint8_t * data);
|
||||
void flash_write_protect (flash_t *obj, uint32_t protect);
|
||||
int flash_get_status (flash_t * obj);
|
||||
int flash_set_status (flash_t * obj, uint32_t data);
|
||||
void flash_reset_status (flash_t * obj);
|
||||
int flash_burst_write (flash_t * obj, uint32_t address, uint32_t Length, uint8_t * data);
|
||||
int flash_burst_read (flash_t * obj, uint32_t address, uint32_t Length, uint8_t * data);
|
||||
int flash_set_extend_addr (flash_t * obj, uint32_t data);
|
||||
int flash_get_extend_addr (flash_t * obj);
|
||||
unsigned int flash_get_size (flash_t *obj);
|
||||
int flash_otp_read (flash_t *obj, uint32_t address, uint32_t Length, uint8_t * data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue