AM243x Motor Control SDK  09.02.00
nikon_api.h File Reference

Go to the source code of this file.

Functions

int32_t nikon_command_wait (struct nikon_priv *priv)
 Wait till PRU finishes Nikon transaction. More...
 
int32_t nikon_get_pos (struct nikon_priv *priv, int8_t cmd)
 Get single cycle Nikon position data. More...
 
void nikon_config_clock (struct nikon_priv *priv, struct nikon_clk_cfg *clk_cfg)
 Configure Nikon clock. More...
 
struct nikon_privnikon_init (PRUICSS_Handle gPruIcssXHandle, int32_t slice, float_t frequency, uint32_t core_clk_freq, uint32_t uart_clk_freq, uint32_t mask, uint32_t totalch)
 Initialize Nikon firmware interface address and get the pointer to struct nikon_priv instance. More...
 
void nikon_config_clr_cfg0 (struct nikon_priv *priv)
 Clear the channel specific frame size cfg registers. More...
 
int32_t nikon_calc_clock (struct nikon_priv *priv, struct nikon_clk_cfg *clk_cfg)
 Calculate Rx and Tx divisors for given frequency. More...
 
void nikon_generate_cdf (struct nikon_priv *priv, int32_t cmd)
 Generate CDF command to be passed in Tx fifo. More...
 
int32_t nikon_reverse_bits (uint64_t bits, int32_t num_bits)
 Reverse the bits (LSB to be sent out first) provided as parameters. More...
 
uint32_t nikon_calc_3bitcrc (struct nikon_priv *priv, uint32_t cmd)
 Calculate 3 bit otf crc and generate tx command. More...
 
void nikon_config_load_share (struct nikon_priv *priv, int32_t mask)
 Configure Load Share mode for Nikon receiver. More...
 
void nikon_config_periodic_trigger (struct nikon_priv *priv)
 Configure periodic trigger operation mode. More...
 
void nikon_config_host_trigger (struct nikon_priv *priv)
 Configure host trigger operation mode. More...
 
int32_t nikon_wait_for_encoder_detection (struct nikon_priv *priv)
 Detect whether the connected encoder is of selected frequency. More...
 
void nikon_update_enc_len (struct nikon_priv *priv, uint32_t num_encoders, uint32_t single_turn_len[], uint32_t multi_turn_len[], uint32_t ch)
 Update number of encoders connected in bus or one-to-one and update data lengths of those encoders. More...
 
void nikon_update_clock_freq (struct nikon_priv *priv, float_t frequency)
 Update the operating baud rate as user speciefied baud rate through UART menu. More...
 
uint32_t nikon_get_current_channel (struct nikon_priv *priv, uint32_t ch_idx)
 Retrives the current channel in use. More...
 
uint32_t nikon_get_totalchannels (struct nikon_priv *priv)
 Retrives total number of channels configured. More...
 
void nikon_update_enc_addr (struct nikon_priv *priv, uint32_t enc_addr, uint32_t ls_ch)
 Update encoder address as specified by the user. More...
 
void nikon_update_eeprom_addr (struct nikon_priv *priv, uint32_t addr)
 Access encoder's EEPROM location specified by the user. More...
 
void nikon_update_eeprom_data (struct nikon_priv *priv, uint32_t data_high, uint32_t data_low)
 Write data at specified EEPROM location. More...
 
void nikon_update_id_code (struct nikon_priv *priv, uint32_t data_high, uint32_t data_mid, uint32_t data_low)
 Assign the specified 24bits as Identification code of encoder. More...