Fixes for external SPI build options.

pull/29/head
David Garske 2019-12-17 10:36:27 -08:00
parent 0deaef8c00
commit 6ed1e5ca5f
4 changed files with 5 additions and 9 deletions

View File

@ -36,6 +36,8 @@
#include <stdint.h>
uint16_t spi_flash_probe(void);
void spi_release(void);
void spi_flash_sector_erase(uint32_t address);
int spi_flash_read(uint32_t address, void *data, int len);
int spi_flash_write(uint32_t address, const void *data, int len);
@ -43,6 +45,7 @@ int spi_flash_write(uint32_t address, const void *data, int len);
#else
#define spi_flash_probe() do{}while(0)
#define spi_release() do{}while(0)
#endif /* SPI_FLASH */

View File

@ -120,7 +120,7 @@ static int wolfBoot_verify_signature(uint8_t *hash, uint8_t *sig)
}
#endif /* WOLFBOOT_SIGN_RSA2048 */
static uint8_t get_header_ext(struct wolfBoot_image *img, uint16_t type, uint8_t **ptr);
static uint16_t get_header_ext(struct wolfBoot_image *img, uint16_t type, uint8_t **ptr);
static uint16_t get_header(struct wolfBoot_image *img, uint16_t type, uint8_t **ptr)
{

View File

@ -133,7 +133,7 @@ static int spi_flash_write_page(uint32_t address, const void *data, int len)
static int spi_flash_write_sb(uint32_t address, const void *data, int len)
{
const uint8_t *buf = data;
const uint8_t verify;
uint8_t verify = 0;
int j = 0;
wait_busy();
if (len < 1)

View File

@ -33,13 +33,6 @@
#ifdef PLATFORM_stm32f4
#ifdef SPI_FLASH
extern void spi_release(void);
#else
#define spi_release() do{}while(0)
#endif
#define UART1 (0x40011000)
#define UART1_SR (*(volatile uint32_t *)(UART1))