Skip to content

Commit

Permalink
add spi, and some minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
funshine committed Jan 18, 2015
1 parent 262f831 commit df3c823
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .settings/org.eclipse.cdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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/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/appendContributed=true
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@ Tencent QQ group QQ群: 309957875<br />
- add coap module

# 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 />
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 />
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.

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 />
[更多变更日志](https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_cn#change_log)

Expand Down
2 changes: 1 addition & 1 deletion app/include/user_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define NODE_VERSION_INTERNAL 0U

#define NODE_VERSION "NodeMCU 0.9.5"
#define BUILD_DATE "build 20150108"
#define BUILD_DATE "build 20150118"

// #define FLASH_512K
// #define FLASH_1M
Expand Down
8 changes: 6 additions & 2 deletions app/modules/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,16 +672,20 @@ static int net_start( lua_State* L, const char* mt )
{
if(isserver)
pesp_conn->proto.tcp->local_port = port;
else
else{
pesp_conn->proto.tcp->remote_port = port;
pesp_conn->proto.tcp->local_port = espconn_port();
}
NODE_DBG("TCP port is set: %d.\n", port);
}
else if (pesp_conn->type == ESPCONN_UDP)
{
if(isserver)
pesp_conn->proto.udp->local_port = port;
else
else{
pesp_conn->proto.udp->remote_port = port;
pesp_conn->proto.udp->local_port = espconn_port();
}
NODE_DBG("UDP port is set: %d.\n", port);
}

Expand Down
4 changes: 2 additions & 2 deletions app/platform/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ int platform_gpio_read( unsigned pin )
return -1;

if(pin == 0){
gpio16_input_conf();
// gpio16_input_conf();
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]));
}

Expand Down
Binary file added pre_build/0.9.5/nodemcu_20150108.bin
Binary file not shown.
Binary file modified pre_build/0.9.5/nodemcu_latest.bin
Binary file not shown.
Binary file modified pre_build/latest/nodemcu_latest.bin
Binary file not shown.

0 comments on commit df3c823

Please sign in to comment.