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
N/A

Wake and sleep (lock) initialization function


Definition at line 44 of file common/wake_lock/sl_wake_lock.h

sl_wake_lock_set_remote_req#

void sl_wake_lock_set_remote_req (void )
Parameters
N/A

Signal wake-up to remote controller.


Definition at line 49 of file common/wake_lock/sl_wake_lock.h

sl_wake_lock_clear_remote_req#

void sl_wake_lock_clear_remote_req (void )
Parameters
N/A

Signal go to sleep (lock) to remote controller.


Definition at line 54 of file common/wake_lock/sl_wake_lock.h

sl_wake_lock_set_req_rx_cb#

void sl_wake_lock_set_req_rx_cb (void )
Parameters
N/A

Wake-up signal arrived from remote controller.


Definition at line 59 of file common/wake_lock/sl_wake_lock.h

sl_wake_lock_clear_req_rx_cb#

void sl_wake_lock_clear_req_rx_cb (void )
Parameters
N/A

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


Definition at line 64 of file common/wake_lock/sl_wake_lock.h

sl_wake_lock_set_local#

void sl_wake_lock_set_local (void )
Parameters
N/A

Enable sleep mode locally.


Definition at line 69 of file common/wake_lock/sl_wake_lock.h

sl_wake_lock_clear_local#

void sl_wake_lock_clear_local (void )
Parameters
N/A

Disable sleep mode locally.


Definition at line 74 of file common/wake_lock/sl_wake_lock.h

Macro Definition Documentation#

SL_WAKE_LOCK_ENABLE_LOCAL#

#define SL_WAKE_LOCK_ENABLE_LOCAL
Value:
1

Definition at line 48 of file common/wake_lock/config/sl_wake_lock_config.h

SL_WAKE_LOCK_ENABLE_REMOTE#

#define SL_WAKE_LOCK_ENABLE_REMOTE
Value:
1

Definition at line 53 of file common/wake_lock/config/sl_wake_lock_config.h

SL_WAKE_LOCK_INPUT_POLARITY_ACTIVE_HIGH#

#define SL_WAKE_LOCK_INPUT_POLARITY_ACTIVE_HIGH
Value:
0

Definition at line 59 of file common/wake_lock/config/sl_wake_lock_config.h

SL_WAKE_LOCK_OUTPUT_POLARITY_ACTIVE_HIGH#

#define SL_WAKE_LOCK_OUTPUT_POLARITY_ACTIVE_HIGH
Value:
0

Definition at line 63 of file common/wake_lock/config/sl_wake_lock_config.h

SL_WAKE_LOCK_INPUT_PORT#

#define SL_WAKE_LOCK_INPUT_PORT
Value:
gpioPortD

Definition at line 70 of file common/wake_lock/config/sl_wake_lock_config.h

SL_WAKE_LOCK_INPUT_PIN#

#define SL_WAKE_LOCK_INPUT_PIN
Value:
9

Definition at line 71 of file common/wake_lock/config/sl_wake_lock_config.h

SL_WAKE_LOCK_OUTPUT_PORT#

#define SL_WAKE_LOCK_OUTPUT_PORT
Value:
gpioPortD

Definition at line 76 of file common/wake_lock/config/sl_wake_lock_config.h

SL_WAKE_LOCK_OUTPUT_PIN#

#define SL_WAKE_LOCK_OUTPUT_PIN
Value:
8

Definition at line 77 of file common/wake_lock/config/sl_wake_lock_config.h