add missing pieces for swap-uart; switch to SDK 1.3

pull/36/merge
Thorsten von Eicken 9 years ago
parent 08ac33dd56
commit a41f891695
  1. 4
      Makefile
  2. 20
      user/cgipins.c
  3. 1
      user/config.h

@ -19,7 +19,7 @@ XTENSA_TOOLS_ROOT ?= $(abspath ../esp-open-sdk/xtensa-lx106-elf/bin)/
# Base directory of the ESP8266 SDK package, absolute
# Typically you'll download from Espressif's BBS, http://bbs.espressif.com/viewforum.php?f=5
SDK_BASE ?= $(abspath ../esp_iot_sdk_v1.2.0)
SDK_BASE ?= $(abspath ../esp_iot_sdk_v1.3.0)
# Esptool.py path and port, only used for 1-time serial flashing
# Typically you'll use https://github.com/themadinventor/esptool
@ -30,7 +30,7 @@ ESPBAUD ?= 460800
# --------------- chipset configuration ---------------
# Pick your flash size: "512KB" or "4MB"
FLASH_SIZE ?= 4MB
FLASH_SIZE ?= 512KB
ifeq ("$(FLASH_SIZE)","512KB")
# Winbond 25Q40 512KB flash, typ for esp-01 thru esp-11

@ -8,15 +8,16 @@
#include "serbridge.h"
static char *map_names[] = {
"esp-bridge", "jn-esp-v2", "esp-01(AVR)", "esp-01(ARM)", "esp-br-rev",
"esp-bridge", "jn-esp-v2", "esp-01(AVR)", "esp-01(ARM)", "esp-br-rev", "wifi-link-12",
};
static char* map_func[] = { "reset", "isp", "conn_led", "ser_led" };
static int8_t map_asn[][4] = {
{ 12, 13, 0, 14 }, // esp-bridge
{ 12, 13, 0, 2 }, // jn-esp-v2
{ 0, -1, 2, -1 }, // esp-01(AVR)
{ 0, 2, -1, -1 }, // esp-01(ARM)
{ 13, 12, 14, 0 }, // esp-br-rev -- for test purposes
static char* map_func[] = { "reset", "isp", "conn_led", "ser_led", "swap_uart" };
static int8_t map_asn[][5] = {
{ 12, 13, 0, 14, 0 }, // esp-bridge
{ 12, 13, 0, 2, 0 }, // jn-esp-v2
{ 0, -1, 2, -1, 0 }, // esp-01(AVR)
{ 0, 2, -1, -1, 0 }, // esp-01(ARM)
{ 13, 12, 14, 0, 0 }, // esp-br-rev -- for test purposes
{ 3, 1, 0, 2, 1 }, // esp-link-12
};
static const int num_map_names = sizeof(map_names)/sizeof(char*);
static const int num_map_func = sizeof(map_func)/sizeof(char*);
@ -33,7 +34,8 @@ int ICACHE_FLASH_ATTR cgiPinsGet(HttpdConnData *connData) {
for (int i=0; i<num_map_names; i++) {
int8_t *map = map_asn[i];
if (map[0] == flashConfig.reset_pin && map[1] == flashConfig.isp_pin &&
map[2] == flashConfig.conn_led_pin && map[3] == flashConfig.ser_led_pin) {
map[2] == flashConfig.conn_led_pin && map[3] == flashConfig.ser_led_pin &&
map[4] == flashConfig.swap_uart) {
curr = i;
}
}

@ -9,6 +9,7 @@ typedef struct {
char hostname[32]; // if using DHCP
uint32_t staticip, netmask, gateway; // using DHCP if staticip==0
uint8_t log_mode; // UART log debug mode
uint8_t swap_uart; // swap uart0 to gpio 13&15
} FlashConfig;
extern FlashConfig flashConfig;

Loading…
Cancel
Save