DNx-SL-514 Synchronous Serial Interface Board
Chapter 3
21
Programming with the Low-Level API
May 2018
www.ueidaq.com
508.921.4600
© Copyright 2018
United Electronic Industries, Inc.
3.3.1
Configuring
Serial
Interface
The SL-514 master and slave ports are configured using the
DqAdv514Config()
API:
DqAdv514Config(
int hd,
// Handle to IOM received from DqOpenIOM()
int devn,
// Board device # inside the IOM chassis
int chan,
// Channel to be configured
pL514_CONFIG config);// Structure to hold config settings
The
pL514_CFG
structure consists of the following elements:
// SSI channel configuration
typedef struct {
uint32 ch_cfg; // channel configuration
uint32 flags; // <Reserved>
uint32 clk_source; // clock source for master
uint32 baud_rate; // baud rate for master (100Hz to 1.3 MHz)
// Master SSI setting (sends clocks, receives data)
uint32 m_word_sz; // master word size (3 to 32 bits)
uint32 m_debounce; // debouncing settings (0=bypass)
uint32 m_trigger; // Tx trigger source
uint32 m_Tv; // Tv, master
uint32 m_Tp; // Tp, master
uint32 m_Tm; // Tm, master
// Slave SSI setting (sends data upon receiving clocks)
uint32 s_word_sz; // master clock size
uint32 s_debounce; // debouncing settings
uint32 s_trigger; // Tx trigger source
uint32 s_Tv; // Tv, master
uint32 s_Tp; // Tp, master
uint32 s_Tm; // Tm, master
} L514_CONFIG, *pL514_CONFIG;
lists configuration options for each element. All parameters listed in
are uint32.