add spi, and some minor fix

This commit is contained in:
funshine 2015-01-18 11:46:15 +08:00
parent 262f831e07
commit df3c82391f
8 changed files with 17 additions and 12 deletions

View File

@ -1,6 +1,6 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/PATH/delimiter=; environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/PATH/delimiter=;
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/PATH/operation=append environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/PATH/operation=append
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/PATH/value=C\:\\Espressif\\xtensa-lx106-elf\\bin environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/PATH/value=C\:\\Espressif\\xtensa-lx106-elf\\bin;C\:\\MinGW\\bin;C\:\\MinGW\\msys\\1.0\\bin;C\:\\Python27
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/append=true environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/append=true
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/appendContributed=true environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/appendContributed=true

View File

@ -26,18 +26,19 @@ Tencent QQ group QQ群: 309957875<br />
- add coap module - add coap module
# Change log # Change log
2015-01-18<br />
merge mqtt module to [new branch mqtt](https://github.com/nodemcu/nodemcu-firmware/tree/mqtt) from [https://github.com/tuanpmt/esp_mqtt](https://github.com/tuanpmt/esp_mqtt).<br />
merge spi module from iabdalkader:spi. <br />
fix #110,set local port to random in client mode.<br />
modify gpio.read to NOT set pin to input mode automatic.<br />
add PATH env with C:\MinGW\bin;C:\MinGW\msys\1.0\bin;C:\Python27 in eclipse project. resolve #103.
2015-01-08<br /> 2015-01-08<br />
fix net.socket:send() issue when multi sends are called. <br /> fix net.socket:send() issue when multi sends are called. <br />
*NOTE*: if data length is bigger than 1460, send next packet AFTER "sent" callback is called.<br /> *NOTE*: if data length is bigger than 1460, send next packet AFTER "sent" callback is called.<br />
fix file.read() api, take 0xFF as a regular byte, not EOF.<br /> fix file.read() api, take 0xFF as a regular byte, not EOF.<br />
pre_build/latest/nodemcu_512k_latest.bin is removed. use pre_build/latest/nodemcu_latest.bin instead. pre_build/latest/nodemcu_512k_latest.bin is removed. use pre_build/latest/nodemcu_latest.bin instead.
2015-01-07<br />
retrive more ram back.<br />
add api file.format() to rebuild file system.<br />
rename "NodeMcu" to "NodeMCU" in firmware.<br />
add some check for file system op.
[more change log](https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en#change_log)<br /> [more change log](https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en#change_log)<br />
[更多变更日志](https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_cn#change_log) [更多变更日志](https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_cn#change_log)

View File

@ -7,7 +7,7 @@
#define NODE_VERSION_INTERNAL 0U #define NODE_VERSION_INTERNAL 0U
#define NODE_VERSION "NodeMCU 0.9.5" #define NODE_VERSION "NodeMCU 0.9.5"
#define BUILD_DATE "build 20150108" #define BUILD_DATE "build 20150118"
// #define FLASH_512K // #define FLASH_512K
// #define FLASH_1M // #define FLASH_1M

View File

@ -672,16 +672,20 @@ static int net_start( lua_State* L, const char* mt )
{ {
if(isserver) if(isserver)
pesp_conn->proto.tcp->local_port = port; pesp_conn->proto.tcp->local_port = port;
else else{
pesp_conn->proto.tcp->remote_port = port; pesp_conn->proto.tcp->remote_port = port;
pesp_conn->proto.tcp->local_port = espconn_port();
}
NODE_DBG("TCP port is set: %d.\n", port); NODE_DBG("TCP port is set: %d.\n", port);
} }
else if (pesp_conn->type == ESPCONN_UDP) else if (pesp_conn->type == ESPCONN_UDP)
{ {
if(isserver) if(isserver)
pesp_conn->proto.udp->local_port = port; pesp_conn->proto.udp->local_port = port;
else else{
pesp_conn->proto.udp->remote_port = port; pesp_conn->proto.udp->remote_port = port;
pesp_conn->proto.udp->local_port = espconn_port();
}
NODE_DBG("UDP port is set: %d.\n", port); NODE_DBG("UDP port is set: %d.\n", port);
} }

View File

@ -129,11 +129,11 @@ int platform_gpio_read( unsigned pin )
return -1; return -1;
if(pin == 0){ if(pin == 0){
gpio16_input_conf(); // gpio16_input_conf();
return 0x1 & gpio16_input_get(); return 0x1 & gpio16_input_get();
} }
GPIO_DIS_OUTPUT(pin_num[pin]); // GPIO_DIS_OUTPUT(pin_num[pin]);
return 0x1 & GPIO_INPUT_GET(GPIO_ID_PIN(pin_num[pin])); return 0x1 & GPIO_INPUT_GET(GPIO_ID_PIN(pin_num[pin]));
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.