Wake-Lock#

Component that provides support for sleep and remote wake-up functionality. The UART driver is not able to receive data in EM2 (deep sleep) mode, therefore an external signal is needed to wake the controller up before UART communication. This component can be used with NCP host and NCP target applications. Waking up is automatic after signal arrival, but application has to decide about sleep. This functionality requires two dedicated pins to work. This is a No-Code component if used together with NCP Interface or NCP Host Communication Interface components.

Function Documentation#

sl_wake_lock_init#

void sl_wake_lock_init (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A

Wake and sleep (lock) initialization function


sl_wake_lock_set_remote_req#

void sl_wake_lock_set_remote_req (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A

Signal wake-up to remote controller.


sl_wake_lock_clear_remote_req#

void sl_wake_lock_clear_remote_req (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A

Signal go to sleep (lock) to remote controller.


sl_wake_lock_set_req_rx_cb#

void sl_wake_lock_set_req_rx_cb (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A

Wake-up signal arrived from remote controller.


sl_wake_lock_clear_req_rx_cb#

void sl_wake_lock_clear_req_rx_cb (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A

Go to sleep (lock) signal arrived from remote controller.


sl_wake_lock_set_local#

void sl_wake_lock_set_local (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A

Enable sleep mode locally.


sl_wake_lock_clear_local#

void sl_wake_lock_clear_local (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A

Disable sleep mode locally.


Macro Definition Documentation#

SL_WAKE_LOCK_ENABLE_LOCAL#

#define SL_WAKE_LOCK_ENABLE_LOCAL
Value:
1

SL_WAKE_LOCK_ENABLE_REMOTE#

#define SL_WAKE_LOCK_ENABLE_REMOTE
Value:
1

SL_WAKE_LOCK_INPUT_POLARITY_ACTIVE_HIGH#

#define SL_WAKE_LOCK_INPUT_POLARITY_ACTIVE_HIGH
Value:
0

SL_WAKE_LOCK_OUTPUT_POLARITY_ACTIVE_HIGH#

#define SL_WAKE_LOCK_OUTPUT_POLARITY_ACTIVE_HIGH
Value:
0

SL_WAKE_LOCK_INPUT_PORT#

#define SL_WAKE_LOCK_INPUT_PORT
Value:
gpioPortD

SL_WAKE_LOCK_INPUT_PIN#

#define SL_WAKE_LOCK_INPUT_PIN
Value:
9

SL_WAKE_LOCK_OUTPUT_PORT#

#define SL_WAKE_LOCK_OUTPUT_PORT
Value:
gpioPortD

SL_WAKE_LOCK_OUTPUT_PIN#

#define SL_WAKE_LOCK_OUTPUT_PIN
Value:
8