Merge branch 'bugfix/from_github' into 'master'

Bug fixes from Github

See merge request !1487
pull/1217/merge
Ivan Grokhotkov 2017-11-10 11:13:04 +08:00
commit d1f6030921
8 zmienionych plików z 37 dodań i 26 usunięć

Wyświetl plik

@ -42,6 +42,7 @@ extern "C" {
.set_card_clk = &sdmmc_host_set_card_clk, \
.do_transaction = &sdmmc_host_do_transaction, \
.deinit = &sdmmc_host_deinit, \
.command_timeout_ms = 0, \
}
/**

Wyświetl plik

@ -43,6 +43,7 @@ extern "C" {
.set_card_clk = &sdspi_host_set_card_clk, \
.do_transaction = &sdspi_host_do_transaction, \
.deinit = &sdspi_host_deinit, \
.command_timeout_ms = 0, \
}
/**

Wyświetl plik

@ -186,7 +186,15 @@ void esp_perip_clk_init(void)
else {
common_perip_clk = DPORT_WDG_CLK_EN |
DPORT_I2S0_CLK_EN |
#if CONFIG_CONSOLE_UART_NUM != 0
DPORT_UART0_CLK_EN |
#endif
#if CONFIG_CONSOLE_UART_NUM != 1
DPORT_UART1_CLK_EN |
#endif
#if CONFIG_CONSOLE_UART_NUM != 2
DPORT_UART2_CLK_EN |
#endif
DPORT_SPI_CLK_EN |
DPORT_I2C_EXT0_CLK_EN |
DPORT_UHCI0_CLK_EN |
@ -205,7 +213,6 @@ void esp_perip_clk_init(void)
DPORT_PWM1_CLK_EN |
DPORT_I2S1_CLK_EN |
DPORT_SPI_DMA_CLK_EN |
DPORT_UART2_CLK_EN |
DPORT_PWM2_CLK_EN |
DPORT_PWM3_CLK_EN;
hwcrypto_perip_clk = DPORT_PERI_EN_AES |

Wyświetl plik

@ -64,14 +64,14 @@ void _esp_error_check_failed(esp_err_t rc, const char *file, int line, const cha
*/
#ifdef NDEBUG
#define ESP_ERROR_CHECK(x) do { \
esp_err_t rc = (x); \
(void) sizeof(rc); \
esp_err_t __err_rc = (x); \
(void) sizeof(__err_rc); \
} while(0);
#else
#define ESP_ERROR_CHECK(x) do { \
esp_err_t rc = (x); \
if (rc != ESP_OK) { \
_esp_error_check_failed(rc, __FILE__, __LINE__, \
esp_err_t __err_rc = (x); \
if (__err_rc != ESP_OK) { \
_esp_error_check_failed(__err_rc, __FILE__, __LINE__, \
__ASSERT_FUNC, #x); \
} \
} while(0);

Wyświetl plik

@ -48,9 +48,9 @@
static err_t
pppapi_do_ppp_set_default(struct tcpip_api_call *m)
{
struct pppapi_msg_msg *msg = (struct pppapi_msg_msg *)m;
struct pppapi_msg *msg = (struct pppapi_msg *)m;
ppp_set_default(msg->ppp);
ppp_set_default(msg->msg.ppp);
return ERR_OK;
}
@ -103,8 +103,8 @@ pppapi_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passw
static err_t
pppapi_do_ppp_set_notify_phase_callback(struct tcpip_api_call *m)
{
struct pppapi_msg_msg *msg = (struct pppapi_msg_msg *)m;
ppp_set_notify_phase_callback(msg->ppp, msg->msg.setnotifyphasecb.notify_phase_cb);
struct pppapi_msg *msg = (struct pppapi_msg *)m;
ppp_set_notify_phase_callback(msg->msg.ppp, msg->msg.msg.setnotifyphasecb.notify_phase_cb);
return ERR_OK;
}
@ -164,11 +164,11 @@ pppapi_pppos_create(struct netif *pppif, pppos_output_cb_fn output_cb,
static err_t
pppapi_do_pppoe_create(struct tcpip_api_call *m)
{
struct pppapi_msg_msg *msg = (struct pppapi_msg_msg *)m;
struct pppapi_msg *msg = (struct pppapi_msg *)m;
msg->ppp = pppoe_create(msg->msg.ethernetcreate.pppif, msg->msg.ethernetcreate.ethif,
msg->msg.ethernetcreate.service_name, msg->msg.ethernetcreate.concentrator_name,
msg->msg.ethernetcreate.link_status_cb, msg->msg.ethernetcreate.ctx_cb);
msg->msg.ppp = pppoe_create(msg->msg.msg.ethernetcreate.pppif, msg->msg.msg.ethernetcreate.ethif,
msg->msg.msg.ethernetcreate.service_name, msg->msg.msg.ethernetcreate.concentrator_name,
msg->msg.msg.ethernetcreate.link_status_cb, msg->msg.msg.ethernetcreate.ctx_cb);
return ERR_OK;
}
@ -201,17 +201,17 @@ pppapi_pppoe_create(struct netif *pppif, struct netif *ethif, const char *servic
static err_t
pppapi_do_pppol2tp_create(struct tcpip_api_call *m)
{
struct pppapi_msg_msg *msg = (struct pppapi_msg_msg *)m;
struct pppapi_msg *msg = (struct pppapi_msg *)m;
msg->ppp = pppol2tp_create(msg->msg.l2tpcreate.pppif,
msg->msg.l2tpcreate.netif, msg->msg.l2tpcreate.ipaddr, msg->msg.l2tpcreate.port,
msg->msg.ppp = pppol2tp_create(msg->msg.msg.l2tpcreate.pppif,
msg->msg.msg.l2tpcreate.netif, msg->msg.msg.l2tpcreate.ipaddr, msg->msg.msg.l2tpcreate.port,
#if PPPOL2TP_AUTH_SUPPORT
msg->msg.l2tpcreate.secret,
msg->msg.l2tpcreate.secret_len,
msg->msg.msg.l2tpcreate.secret,
msg->msg.msg.l2tpcreate.secret_len,
#else /* PPPOL2TP_AUTH_SUPPORT */
NULL,
#endif /* PPPOL2TP_AUTH_SUPPORT */
msg->msg.l2tpcreate.link_status_cb, msg->msg.l2tpcreate.ctx_cb);
msg->msg.msg.l2tpcreate.link_status_cb, msg->msg.msg.l2tpcreate.ctx_cb);
return ERR_OK;
}
@ -325,9 +325,9 @@ pppapi_close(ppp_pcb *pcb, u8_t nocarrier)
static err_t
pppapi_do_ppp_free(struct tcpip_api_call *m)
{
struct pppapi_msg_msg *msg = (struct pppapi_msg_msg *)m;
struct pppapi_msg *msg = (struct pppapi_msg *)m;
return ppp_free(msg->ppp);
return ppp_free(msg->msg.ppp);
}
/**

Wyświetl plik

@ -555,9 +555,9 @@ static const uint8_t * _mdns_read_fqdn(const uint8_t * packet, const uint8_t * s
return NULL;
}
uint8_t len = start[index++];
if ((len & 0xC0) == 0) {
if (len > 64) {
//length can not be more than 64
if (len < 0xC0) {
if (len > 63) {
//length can not be more than 63
return NULL;
}
uint8_t i;

Wyświetl plik

@ -43,7 +43,7 @@ $(ULP_LD_SCRIPT): $(ULP_LD_TEMPLATE)
# Link object files and generate map file
$(ULP_ELF): $(ULP_OBJECTS) $(ULP_LD_SCRIPT)
$(summary) ULP_LD $(patsubst $(PWD)/%,%,$(CURDIR))/$@
$(ULP_LD) -o $@ -A elf32-esp32ulp -Map=$(ULP_MAP) -T $(ULP_LD_SCRIPT) $<
$(ULP_LD) -o $@ -A elf32-esp32ulp -Map=$(ULP_MAP) -T $(ULP_LD_SCRIPT) $(ULP_OBJECTS)
# Dump the list of global symbols in a convenient format.
$(ULP_SYM): $(ULP_ELF)

Wyświetl plik

@ -292,6 +292,8 @@ class Monitor(object):
self.serial.write(codecs.encode(key))
except serial.SerialException:
pass # this shouldn't happen, but sometimes port has closed in serial thread
except UnicodeEncodeError:
pass # this can happen if a non-ascii character was passed, ignoring
def handle_serial_input(self, data):
# this may need to be made more efficient, as it pushes out a byte