You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
448 B
18 lines
448 B
#ifndef __SPI_FLASH_H___
|
|
#define __SPI_FLASH_H___
|
|
|
|
#include <stdint.h>
|
|
#include "spi.h"
|
|
|
|
unsigned int spi_flash_read_id(spi_t spi);
|
|
|
|
void spi_flash_enable_write(spi_t spi);
|
|
|
|
int spi_flash_erase_sector(spi_t spi, unsigned int SectorAddr);
|
|
|
|
void spi_flash_write(spi_t spi, uint32_t WriteAddr, const uint8_t* pBuffer, uint16_t NumByteToWrite);
|
|
|
|
void spi_flash_read(spi_t spi, unsigned int ReadAddr, uint8_t* pBuffer, uint16_t NumByteToRead);
|
|
|
|
#endif
|
|
|
|
|