arch/dev/radio/dw1000/tsm/trex-tsm.c
/* Start a new slot structure roughly after one slot duration */
Start a new slot structure roughly after one slot duration
Start a new slot structure roughly after one slot duration
int tsm_start(uint32_t slot_duration, uint32_t rx_timeout, tsm_slot_cb callback) {
  if (callback == NULL)
    return -1;
  trexd_stats_reset();
  trexd_set_rx_slot_preambleto_pacs(context.default_preambleto_pacs);
  trexd_set_slot_callback(driver_slot_callback);
  context.cb = callback;
  context.tref = dwt_readsystimestamphi32() + slot_duration;
  context.slot_duration = slot_duration;
  context.slot_rx_timeout = rx_timeout;
  context.slot_idx = -1;
  context.slot_action = TSM_ACTION_NONE;
  tsm_slot_event();
  return 0;
}
int tsm_start ( uint32_t slot_duration , uint32_t rx_timeout , tsm_slot_cb callback ) { if ( callback == NULL ) return -1 ; trexd_stats_reset ( ) ; trexd_set_rx_slot_preambleto_pacs ( context . default_preambleto_pacs ) ; trexd_set_slot_callback ( driver_slot_callback ) ; context . cb = callback ; context . tref = dwt_readsystimestamphi32 ( ) + slot_duration ; context . slot_duration = slot_duration ; context . slot_rx_timeout = rx_timeout ; context . slot_idx = -1 ; context . slot_action = TSM_ACTION_NONE ; tsm_slot_event ( ) ; return 0 ; }
Start a new slot structure roughly after one slot duration
Start a new slot structure roughly after one slot duration
// call back the higher layer before the first slot