1 /***************************************************************************//** 2 * \file flash_qspi.h 3 * \version 1.0 4 * 5 * \brief 6 * This is the header file for PSoC6 external flash driver adoption layer. 7 * 8 ******************************************************************************** 9 * \copyright 10 * 11 * © 2020, Cypress Semiconductor Corporation 12 * or a subsidiary of Cypress Semiconductor Corporation. All rights 13 * reserved. 14 * 15 * This software, including source code, documentation and related 16 * materials ("Software"), is owned by Cypress Semiconductor 17 * Corporation or one of its subsidiaries ("Cypress") and is protected by 18 * and subject to worldwide patent protection (United States and foreign), 19 * United States copyright laws and international treaty provisions. 20 * Therefore, you may use this Software only as provided in the license 21 * agreement accompanying the software package from which you 22 * obtained this Software ("EULA"). 23 * 24 * If no EULA applies, Cypress hereby grants you a personal, non- 25 * exclusive, non-transferable license to copy, modify, and compile the 26 * Software source code solely for use in connection with Cypress?s 27 * integrated circuit products. Any reproduction, modification, translation, 28 * compilation, or representation of this Software except as specified 29 * above is prohibited without the express written permission of Cypress. 30 * 31 * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 32 * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 33 * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 34 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 35 * PARTICULAR PURPOSE. Cypress reserves the right to make 36 * changes to the Software without notice. Cypress does not assume any 37 * liability arising out of the application or use of the Software or any 38 * product or circuit described in the Software. Cypress does not 39 * authorize its products for use in any products where a malfunction or 40 * failure of the Cypress product may reasonably be expected to result in 41 * significant property damage, injury or death ("High Risk Product"). By 42 * including Cypress's product in a High Risk Product, the manufacturer 43 * of such system or application assumes all risk of such use and in doing 44 * so agrees to indemnify Cypress against all liability. 45 * 46 ******************************************************************************/ 47 #ifndef __FLASH_QSPI_H__ 48 #define __FLASH_QSPI_H__ 49 50 #include <stdint.h> 51 #include "cy_pdl.h" 52 53 /* make it exported if used in TOC (cy_serial_flash_prog.c) */ 54 /* cy_stc_smif_block_config_t smifBlockConfig_sfdp; */ 55 56 cy_en_smif_status_t qspi_init_sfdp(uint32_t smif_id); 57 cy_en_smif_status_t qspi_init(cy_stc_smif_block_config_t *blk_config); 58 cy_en_smif_status_t qspi_init_hardware(void); 59 uint32_t qspi_get_prog_size(void); 60 uint32_t qspi_get_erase_size(void); 61 uint32_t qspi_get_mem_size(void); 62 63 SMIF_Type *qspi_get_device(void); 64 cy_stc_smif_context_t *qspi_get_context(void); 65 cy_stc_smif_mem_config_t *qspi_get_memory_config(int index); 66 void qspi_dump_device(cy_stc_smif_mem_device_cfg_t *dev); 67 68 void qspi_deinit(uint32_t smif_id); 69 70 #endif /* __FLASH_QSPI_H__ */ 71