Software Library API naibrd 1.62
See all documentation at naii.docs.com
Conversion Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_ConvertToDebounceLSBtime (uint32_t modid, nai_ttl_debounce_idx_t rawdata, float64_t *debounceLSBtime)
 Returns the debounce LSB time value associated with the debounce LSB index.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_ConvertDebounceLSBtime (uint32_t modid, float64_t debounceTimeLSB, uint32_t *debounceLSB)
 Returns the closest debounce LSB index associated with the debounce LSB time value parameter.
 

Detailed Description


Function Documentation

◆ naibrd_TTL_ConvertDebounceLSBtime()

NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_ConvertDebounceLSBtime ( uint32_t modid,
float64_t debounceTimeLSB,
uint32_t * debounceLSB )

Returns the closest debounce LSB index associated with the debounce LSB time value parameter.

     Raw Data Code Idx     Debounce Time, mS
     -----------------------------------------
       0x00                   0.00016 
       0x01                   0.00032    
       0x02                   0.00064    
       0x03                   0.00128    
       0x04                   0.00256    
       0x05                   0.00512    
       0x06                   0.01024    
       0x07                   0.02048    
       0x08                   0.04096    
       0x09                   0.08192    
       0x0A                   0.16384    
       0x0B                   0.32768    
       0x0C                   0.65536    
       0x0D                   1.31072    
       0x0E                   2.62144    
       0x0F                   5.24288    
       
     *Applicable for D8 module only
Parameters
modid: (Input) TTL Module ID.
debounceTimeLSB: (Input) Debounce LSB, entry in milliseconds (mS).
debounceLSB: (Output) Raw Data Code, debounce LSB index.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_RANGE when invalid raw data range is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_TTL_ConvertToDebounceLSBtime()

NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_ConvertToDebounceLSBtime ( uint32_t modid,
nai_ttl_debounce_idx_t rawdata,
float64_t * debounceLSBtime )

Returns the debounce LSB time value associated with the debounce LSB index.

     Raw Data Code          Debounce Time, mS
     -----------------------------------------
       0x00                   0.00016 
       0x01                   0.00032    
       0x02                   0.00064    
       0x03                   0.00128    
       0x04                   0.00256    
       0x05                   0.00512    
       0x06                   0.01024    
       0x07                   0.02048    
       0x08                   0.04096    
       0x09                   0.08192    
       0x0A                   0.16384    
       0x0B                   0.32768    
       0x0C                   0.65536    
       0x0D                   1.31072    
       0x0E                   2.62144    
       0x0F                   5.24288    
       
     *Applicable for D7 module only
Parameters
modid: (Input) TTL Module ID.
rawdata: (Input) Raw Data Code.
debounceLSBtime: (Output) Debounce LSB time in milliseconds (mS).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_RANGE when invalid raw data range is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.