arch/dev/radio/dw1000/glossy/glossy.c
/* Determines the slot duration based on the packet length and the current configuration.
 * Returns value with 4ns time unit.
 */
Determines the slot duration based on the packet length and the current configuration.
Returns value with 4ns time unit.
Determines the slot duration based on the packet length and the current configuration . Returns value with 4ns time unit .
static uint32_t
calc_slot_duration(uint16_t psdu_len)
{
    return (
        dw1000_estimate_tx_time(dw1000_get_current_cfg(), psdu_len, false) +
           2400*psdu_len + 
           ((GLOSSY_LOG_LEVEL<=GLOSSY_LOG_ERROR_LEVEL) ? 270000 : 500000)
           ) / 4; 
}
static uint32_t calc_slot_duration ( uint16_t psdu_len ) { return ( dw1000_estimate_tx_time ( dw1000_get_current_cfg ( ) , psdu_len , false ) + 2400 * psdu_len + ( ( GLOSSY_LOG_LEVEL <= GLOSSY_LOG_ERROR_LEVEL ) ? 270000 : 500000 ) ) / 4 ; }
Determines the slot duration based on the packet length and the current configuration.
Determines the slot duration based on the packet length and the current configuration .
// Slot duration is computed as: //   - frame on air duration //   - time to download and upload the packet over SPI //   - software delay that depends on the amount of logging // measured SPI upload+download speed //((GLOSSY_LOG_LEVEL<=GLOSSY_LOG_ERROR_LEVEL) ? 500000 : 1500000)    // use larger values when testing with the replier // we use ns instead of uwb ns here for speed, the actual slot duration will be slightly different