1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

Code review

This commit is contained in:
Ivan Grokhotkov
2015-07-06 21:04:08 +03:00
parent 1741bc68b6
commit 5763dbba3b
8 changed files with 67 additions and 59 deletions

View File

@ -7,7 +7,7 @@ TARGET_DIR := ./
TARGET_OBJ_FILES := \
eboot.o \
eboot_command.o \
flash.o \
TARGET_OBJ_PATHS := $(addprefix $(TARGET_DIR)/,$(TARGET_OBJ_FILES))

View File

@ -125,7 +125,7 @@ void main()
if (cmd.action == ACTION_COPY_RAW) {
ets_putc('c'); ets_putc('p'); ets_putc(':');
res = copy_raw(cmd.args[0], cmd.args[1], cmd.args[2]);
ets_putc((char)0x30+res); ets_putc('\n');
ets_putc('0'+res); ets_putc('\n');
if (res == 0) {
cmd.action = ACTION_LOAD_APP;
cmd.args[0] = cmd.args[1];
@ -136,7 +136,7 @@ void main()
ets_putc('l'); ets_putc('d'); ets_putc('\n');
res = load_app_from_flash_raw(cmd.args[0]);
//we will get to this only on load fail
ets_putc('e'); ets_putc(':'); ets_putc((char)0x30+res); ets_putc('\n');
ets_putc('e'); ets_putc(':'); ets_putc('0'+res); ets_putc('\n');
}
if (res) {

Binary file not shown.

View File

@ -4,7 +4,7 @@
* Redistribution and use is permitted according to the conditions of the
* 3-clause BSD license to be found in the LICENSE file.
*/
/*
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
@ -46,4 +46,4 @@ int SPIEraseAreaEx(const uint32_t start, const uint32_t size)
return 0;
}
*/

View File

@ -12,7 +12,7 @@ int SPIEraseBlock(uint32_t block);
int SPIEraseSector(uint32_t sector);
int SPIRead(uint32_t addr, void *dest, size_t size);
int SPIWrite(uint32_t addr, void *src, size_t size);
//int SPIEraseAreaEx(const uint32_t start, const uint32_t size);
int SPIEraseAreaEx(const uint32_t start, const uint32_t size);
#define FLASH_SECTOR_SIZE 0x1000
#define FLASH_BLOCK_SIZE 0x10000