/*---------------------------------------------------------------------------- * Copyright (c) Fenda Technologies Co., Ltd. 2020. All rights reserved. * * Description: flash_port_mspi.h * * Author: saimen * * Create: 2020-09-25 *--------------------------------------------------------------------------*/ #ifndef FLASH_PORT_MSPI_H #define FLASH_PORT_MSPI_H #include #include #ifdef __cplusplus extern "C" { #endif //***************************************************************************** // // Macro definitions // //***************************************************************************** //***************************************************************************** // // External function definitions. // //***************************************************************************** extern uint32_t flash_port_print(const char *pcFmt, ...); extern void flash_port_create_mutex(void); extern void flash_port_mutex_lock(void); extern void flash_port_mutex_unlock(void); extern void flash_port_delay_ms(uint32_t ms); extern void flash_port_delay_us(uint32_t us); extern void flash_port_power_on(void); extern void flash_port_power_off(void); extern void flash_port_bus_pins_enable(void); extern void flash_port_bus_pins_disable(void); extern uint32_t flash_port_get_id (void); extern int flash_port_sdio_init (void); extern int flash_port_sdio_deinit (void); extern int flash_port_enter_sleep (void); extern int flash_port_exit_sleep (void); extern int flash_port_timing_scan (uint32_t eUHSMode,uint32_t ui32Clock,uint32_t eBusWidth,uint8_t *ui8CalibBuf,uint32_t ui32StartBlk,uint32_t ui32BlkCnt,uint8_t ui8TxRxDelays[2]); extern int flash_port_set_txrx_delay(void *pHost, uint8_t ui8TxRxDelays[2]); extern uint32_t flash_port_block_rw(uint32_t ui32Blk, uint32_t ui32BlkCnt, uint8_t *pui8Buf, bool bRead, bool bASync); extern uint32_t flash_port_block_erase(uint32_t ui32Blk, uint32_t ui32BlkCnt); #ifdef __cplusplus } #endif #endif