1 /***************************************************************************//** 2 * \file cy_smif_psoc6.h 3 * \version 1.0 4 * 5 * \brief 6 * This is the header file for PSoC6 SMIF driver adoption layer. 7 * 8 ******************************************************************************** 9 * \copyright 10 * 11 * © 2019, 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 48 #ifndef CY_SMIF_PSOC6_H_ 49 #define CY_SMIF_PSOC6_H_ 50 51 #include "stddef.h" 52 #include "stdbool.h" 53 54 #include "flash_qspi.h" 55 56 #ifndef off_t 57 typedef long int off_t; 58 #endif 59 60 int psoc6_smif_read(const struct flash_area *fap, off_t addr, void *data, size_t len); 61 int psoc6_smif_write(const struct flash_area *fap, off_t addr, const void *data, size_t len); 62 int psoc6_smif_erase(off_t addr, size_t size); 63 64 #endif /* CY_SMIF_PSOC6_H_ */ 65