arch/dev/radio/dw1000/dw1000.c
/*---------------------------------------------------------------------------*/
/* Functions to put DW1000 into deep sleep mode and wake it up */
Functions to put DW1000 into deep sleep mode and wake it up
Functions to put DW1000 into deep sleep mode and wake it up
void
dw1000_sleep(void)
{
  if (dw1000_is_sleeping)
    return;
  dw1000_disable_interrupt(); 
#if DW1000_RANGING_ENABLED
  dw1000_range_reset(); 
#endif
  frame_pending   = 0;
  frame_uploaded  = 0; 
  wait_ack_txdone = 0;
  dwt_entersleep();
  dw1000_is_sleeping = 1;
}
void dw1000_sleep ( void ) { if ( dw1000_is_sleeping ) return ; dw1000_disable_interrupt ( ) ; #if DW1000_RANGING_ENABLED dw1000_range_reset ( ) ; #endif frame_pending = 0 ; frame_uploaded = 0 ; wait_ack_txdone = 0 ; dwt_entersleep ( ) ; dw1000_is_sleeping = 1 ; }
Functions to put DW1000 into deep sleep mode and wake it up
Functions to put DW1000 into deep sleep mode and wake it up
// disable and keep disabled until wakeup /* In case we were ranging */ // frame is not preserved during sleep