Added functions and example for deep sleep on mb851.
The added function let a process to make the system go into deep sleep for maximum power saving. The udp-ipv6-example shows how to use these new functions.
This commit is contained in:
parent
5a4a39afb3
commit
6655c876f2
11 changed files with 483 additions and 16 deletions
|
@ -395,7 +395,11 @@ static int stm32w_radio_on(void)
|
|||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int stm32w_radio_is_on(void)
|
||||
{
|
||||
return onoroff == ON;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
@ -512,7 +516,7 @@ PROCESS_THREAD(stm32w_radio_process, ev, data)
|
|||
NETSTACK_RDC.input();
|
||||
}
|
||||
if(!RXBUFS_EMPTY()){
|
||||
// Some data packet still in rx buffer (this appens because process_poll doesn't queue requests),
|
||||
// Some data packet still in rx buffer (this happens because process_poll doesn't queue requests),
|
||||
// so stm32w_radio_process need to be called again.
|
||||
process_poll(&stm32w_radio_process);
|
||||
}
|
||||
|
|
|
@ -53,5 +53,7 @@ short last_packet_rssi();
|
|||
|
||||
extern const struct radio_driver stm32w_radio_driver;
|
||||
|
||||
int stm32w_radio_is_on(void);
|
||||
|
||||
|
||||
#endif /* __STM32W_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue