Skip to content

Commit

Permalink
feature(alink): add alink component and improve the example
Browse files Browse the repository at this point in the history
1. disable joylink for now
2. clear alink_v2.0
3. use button module for alink key
4. add alink submodule
5. remove joylink
  • Loading branch information
costaud committed Dec 9, 2017
1 parent f874a4f commit 005aaf0
Show file tree
Hide file tree
Showing 136 changed files with 311 additions and 21,800 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
[submodule "components/network/mqtt/espmqtt"]
path = components/network/mqtt/espmqtt
url = https://github.com/tuanpmt/espmqtt.git
[submodule "components/platforms/esp32-alink"]
path = components/platforms/esp32-alink
url = https://github.com/espressif/esp32-alink.git
[submodule "components/platforms/alink/esp32-alink"]
path = components/platforms/alink/esp32-alink
url = https://github.com/espressif/esp32-alink.git
165 changes: 158 additions & 7 deletions components/__config/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -515,16 +515,167 @@ menu "IoT Solution settings"
endmenu

menu "Platforms and Clouds"
config IOT_ALINK_EMBED_ENABLE
bool "ALINK_EMBED_ENABLE"
config IOT_ALINK_ENABLE
bool "ALINK_ENABLE"
default n
help
"Select this one to enable ALINK EMBED component"
config IOT_JOYLINK_ENABLE
bool "JOYLINK_ENABLE"
default n
help
"Select this one to enable JOYLINK component"
menu "ALINK_SETTINGS"
depends on IOT_ALINK_ENABLE
choice ALINK_VERSION
bool "Select the version of alink"
default ALINK_VERSION_EMBED
help
esp32 alink embed is the access Ali small wisdom, SDK, APP side are all
used in the Ali. Free service provided by Ali.

esp32 alink sds's APP and the server are allowed to customize, but need
to pay the service fee

config ALINK_VERSION_EMBED
bool "esp32 alink embed"
config ALINK_VERSION_SDS
bool "esp32 alink sds"
endchoice

config ALINK_VERSION
int
default 0 if ALINK_VERSION_EMBED
default 1 if ALINK_VERSION_SDS
config ALINK_WRITE_NOT_BUFFER
bool "Remove the buffer space for reporting data"
default 0
help
Remove the buffer space for reporting data.

config WIFI_WAIT_TIME
int "the connection router maximum latency unit is seconds"
default 60
help
the connection router maximum latency unit is seconds

config ALINK_TASK_PRIOTY
int "Configure the priority of all alink tasks"
default 6
help
Configure the priority of all alink tasks

config ALINK_EVENT_STACK_SIZE
int "Event callback function stack space"
default 4096
help
Event callback function stack space

config ALINK_POST_DATA_STACK_SIZE
int "The size of the task of reporting data to Ali"
default 4096
help
The size of the task of reporting data to Ali

config DOWN_CMD_QUEUE_NUM
int "The number of buffered data received"
default 3
help
The number of buffered data received

config UP_CMD_QUEUE_NUM
int "The number of buffered data send"
default 3
help
The number of buffered data send

config ALINK_DATA_LEN
int "The maximum length of the transmitted data"
default 1024
help
The maximum length of this data is 1536B

config ALINK_CHIPID
string "The name of the chip"
default "esp32"
help
Before modifying this parameter, make sure that the device is
unbinded with Ali cloud server

config ALINK_MODULE_NAME
string "The name of the module"
default "ESP-WROOM-32"
help
Before modifying this parameter, make sure that the device is
unbinded with Ali cloud server

choice LOG_ALINK_LEVEL
bool "Configure the alink application layer's log"
default LOG_ALINK_LEVEL_DEBUG
help
Specify how much output to see in logs by default.
Note that this setting limits which log statements
are compiled into the program. So setting this to, say,
"Warning" would mean that changing log level to "Debug"
at runtime will not be possible.

config LOG_ALINK_LEVEL_NONE
bool "No output"
config LOG_ALINK_LEVEL_ERROR
bool "Error"
config LOG_ALINK_LEVEL_WARN
bool "Warning"
config LOG_ALINK_LEVEL_INFO
bool "Info"
config LOG_ALINK_LEVEL_DEBUG
bool "Debug"
config LOG_ALINK_LEVEL_VERBOSE
bool "Verbose"
endchoice

config LOG_ALINK_LEVEL
int
default 0 if LOG_ALINK_LEVEL_NONE
default 1 if LOG_ALINK_LEVEL_ERROR
default 2 if LOG_ALINK_LEVEL_WARN
default 3 if LOG_ALINK_LEVEL_INFO
default 4 if LOG_ALINK_LEVEL_DEBUG
default 5 if LOG_ALINK_LEVEL_VERBOSE

choice LOG_ALINK_SDK_LEVEL
bool "Configure the alink sdk's log"
default LOG_ALINK_SDK_LEVEL_TRACE
help
Specify how much output to see in logs by default.
Note that this setting limits which log statements
are compiled into the program. So setting this to, say,
"Warning" would mean that changing log level to "Debug"
at runtime will not be possible.

config LOG_ALINK_SDK_LEVEL_NONE
bool "No output"
config LOG_ALINK_SDK_LEVEL_ERROR
bool "Error"
config LOG_ALINK_SDK_LEVEL_WARN
bool "Warning"
config LOG_ALINK_SDK_LEVEL_INFO
bool "Info"
config LOG_ALINK_SDK_LEVEL_DEBUG
bool "Debug"
config LOG_ALINK_SDK_LEVEL_TRACE
bool "Trace"
endchoice

config LOG_ALINK_SDK_LEVEL
int
default 0 if LOG_ALINK_SDK_LEVEL_NONE
default 1 if LOG_ALINK_SDK_LEVEL_FATAL
default 2 if LOG_ALINK_SDK_LEVEL_ERROR
default 3 if LOG_ALINK_SDK_LEVEL_WARN
default 4 if LOG_ALINK_SDK_LEVEL_INFO
default 5 if LOG_ALINK_SDK_LEVEL_DEBUG
default 6 if LOG_ALINK_SDK_LEVEL_TRACE
endmenu
#config IOT_JOYLINK_ENABLE
# bool "JOYLINK_ENABLE"
# default n
# help
# "Select this one to enable JOYLINK component"
endmenu

menu "WiFi abstract"
Expand Down
24 changes: 24 additions & 0 deletions components/platforms/alink/component.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Component Makefile
#

ifdef CONFIG_IOT_ALINK_ENABLE

COMPONENT_ADD_INCLUDEDIRS := esp32-alink/include esp32-alink/adaptation/include
COMPONENT_SRCDIRS := esp32-alink/adaptation esp32-alink/application

ifdef CONFIG_ALINK_VERSION_EMBED
LIBS := alink_agent tfspal
endif

ifdef CONFIG_ALINK_VERSION_SDS
LIBS := alink_agent_sds tfspal
endif

COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH)/esp32-alink/lib \
$(addprefix -l,$(LIBS))

else
COMPONENT_ADD_INCLUDEDIRS :=
COMPONENT_SRCDIRS :=
endif
17 changes: 0 additions & 17 deletions components/platforms/alink_v2.0/component.mk

This file was deleted.

14 changes: 0 additions & 14 deletions components/platforms/cloud_objs/component.mk

This file was deleted.

1 change: 0 additions & 1 deletion components/platforms/joylink/BUGS

This file was deleted.

8 changes: 0 additions & 8 deletions components/platforms/joylink/COPYING

This file was deleted.

11 changes: 0 additions & 11 deletions components/platforms/joylink/Kconfig_joylink

This file was deleted.

18 changes: 0 additions & 18 deletions components/platforms/joylink/Make_jl

This file was deleted.

53 changes: 0 additions & 53 deletions components/platforms/joylink/Makefile.rule

This file was deleted.

13 changes: 0 additions & 13 deletions components/platforms/joylink/README

This file was deleted.

4 changes: 0 additions & 4 deletions components/platforms/joylink/README.md

This file was deleted.

Loading

0 comments on commit 005aaf0

Please sign in to comment.