mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-22 17:47:04 +08:00
Merge branch 'feature/update_spiffs' into 'master'
Update SPIFFS See merge request sdk/ESP8266_RTOS_SDK!842
This commit is contained in:
@ -6,16 +6,16 @@
|
||||
|
||||
#define ROM_FLASH_BUF_DECLARE(__name, __size) uint8_t __name[__size] __attribute__((aligned(4)))
|
||||
|
||||
typedef struct esp_spi_flash_chip {
|
||||
uint32_t deviceId;
|
||||
uint32_t chip_size; // chip size in byte
|
||||
uint32_t block_size;
|
||||
uint32_t sector_size;
|
||||
uint32_t page_size;
|
||||
uint32_t status_mask;
|
||||
} esp_spi_flash_chip_t;
|
||||
typedef struct {
|
||||
uint32_t device_id;
|
||||
uint32_t chip_size; // chip size in bytes
|
||||
uint32_t block_size;
|
||||
uint32_t sector_size;
|
||||
uint32_t page_size;
|
||||
uint32_t status_mask;
|
||||
} esp_rom_spiflash_chip_t;
|
||||
|
||||
extern esp_spi_flash_chip_t flashchip;
|
||||
extern esp_rom_spiflash_chip_t g_rom_flashchip;
|
||||
|
||||
uint32_t Wait_SPI_Idle();
|
||||
|
||||
@ -27,13 +27,13 @@ void system_soft_wdt_feed();
|
||||
|
||||
void Cache_Read_Enable_New();
|
||||
|
||||
int SPI_page_program(esp_spi_flash_chip_t *chip, uint32_t dst_addr, void *pbuf, uint32_t len);
|
||||
int SPI_read_data(esp_spi_flash_chip_t *chip, uint32_t dst_addr, void *pbuf, uint32_t len);
|
||||
int SPI_write_enable(esp_spi_flash_chip_t *chip);
|
||||
int SPI_sector_erase(esp_spi_flash_chip_t *chip, uint32_t sect_addr);
|
||||
int SPI_write_status(esp_spi_flash_chip_t *chip, uint32_t status);
|
||||
int SPI_read_status(esp_spi_flash_chip_t *chip, uint32_t *status);
|
||||
int Enable_QMode(esp_spi_flash_chip_t *chip);
|
||||
int SPI_page_program(esp_rom_spiflash_chip_t *chip, uint32_t dst_addr, void *pbuf, uint32_t len);
|
||||
int SPI_read_data(esp_rom_spiflash_chip_t *chip, uint32_t dst_addr, void *pbuf, uint32_t len);
|
||||
int SPI_write_enable(esp_rom_spiflash_chip_t *chip);
|
||||
int SPI_sector_erase(esp_rom_spiflash_chip_t *chip, uint32_t sect_addr);
|
||||
int SPI_write_status(esp_rom_spiflash_chip_t *chip, uint32_t status);
|
||||
int SPI_read_status(esp_rom_spiflash_chip_t *chip, uint32_t *status);
|
||||
int Enable_QMode(esp_rom_spiflash_chip_t *chip);
|
||||
|
||||
int SPIWrite(uint32_t addr, const uint8_t *src, uint32_t size);
|
||||
int SPIRead(uint32_t addr, void *dst, uint32_t size);
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include "rom/ets_sys.h"
|
||||
#ifndef BOOTLOADER_BUILD
|
||||
#include "esp_heap_caps.h"
|
||||
#endif
|
||||
@ -60,18 +61,6 @@ int ets_putc(int c);
|
||||
*/
|
||||
int ets_vprintf(const char *fmt, va_list ap);
|
||||
|
||||
/**
|
||||
* @brief Printf the strings to uart or other devices, similar with printf, simple than printf.
|
||||
* Can not print float point data format, or longlong data format.
|
||||
*
|
||||
* @param const char *fmt : See printf.
|
||||
*
|
||||
* @param ... : See printf.
|
||||
*
|
||||
* @return int : the length printed to the output device.
|
||||
*/
|
||||
int ets_printf(const char *fmt, ...);
|
||||
|
||||
#ifndef os_printf
|
||||
#define os_printf printf
|
||||
#endif
|
||||
|
@ -109,6 +109,18 @@ void os_delay_us(uint16_t us);
|
||||
*/
|
||||
void ets_delay_us(uint32_t us);
|
||||
|
||||
/**
|
||||
* @brief Printf the strings to uart or other devices, similar with printf, simple than printf.
|
||||
* Can not print float point data format, or longlong data format.
|
||||
*
|
||||
* @param const char *fmt : See printf.
|
||||
*
|
||||
* @param ... : See printf.
|
||||
*
|
||||
* @return int : the length printed to the output device.
|
||||
*/
|
||||
int ets_printf(const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* @brief Register the print output function.
|
||||
*
|
||||
|
25
components/esp8266/include/rom/spi_flash.h
Normal file
25
components/esp8266/include/rom/spi_flash.h
Normal file
@ -0,0 +1,25 @@
|
||||
// Copyright 2010-2016 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef _ROM_SPI_FLASH_H_
|
||||
#define _ROM_SPI_FLASH_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "esp_attr.h"
|
||||
|
||||
#include "esp8266/rom_functions.h"
|
||||
|
||||
#endif /* _ROM_SPI_FLASH_H_ */
|
Reference in New Issue
Block a user