/** ****************************************************************************** * * @addtogroup PIOS PIOS Core hardware abstraction layer * @{ * @addtogroup PIOS_FLASH Flash device handler * @{ * * @file pios_flash_w25x.h * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. * @brief Driver for talking to W25X flash chip (and most JEDEC chips) * @see The GNU Public License (GPL) Version 3 * *****************************************************************************/ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ int32_t PIOS_Flash_W25X_Init(uint32_t spi_id, uint32_t slave_num); int32_t PIOS_Flash_W25X_ReadStatus(); int32_t PIOS_Flash_W25X_ReadID(); int32_t PIOS_Flash_W25X_EraseChip(); int32_t PIOS_Flash_W25X_EraseSector(uint32_t add); int32_t PIOS_Flash_W25X_WriteData(uint32_t addr, uint8_t * data, uint16_t len); int32_t PIOS_Flash_W25X_ReadData(uint32_t addr, uint8_t * data, uint16_t len);