PelionIoT / simple-mbed-cloud-client

Simple interface for Mbed Cloud Client - deprecated
Apache License 2.0
7 stars 21 forks source link

add support for the "NO_LED" flag that disable the heartbeat thread #65

Closed ithinuel closed 5 years ago

ithinuel commented 5 years ago

Some target such as the NUCLEO_L476RG has only 1 controllable led that conflict with SPI's CLK on Arduino's pin D13.

If set, this flag disables the led_thread.

Alternatively, this option could be provided as a proper config in mbed_lib.json. Would that be a prefered solution to the solution in this PR ?

screamerbg commented 5 years ago

@ithinuel Can you make this application config flag? e.g. macro MBED_CONF_APP_NO_LED

ithinuel commented 5 years ago

The lastest push enables the conf : "client_app.no_led": 1

ithinuel commented 5 years ago

config added as MBED_CONF_APP_NO_LED with the defined(MBED_CONF_APP_NO_LED) && (MBED_CONF_APP_NO_LED == 1) is required to detect when it is set to 0.