|
AM243x MCU+ SDK
08.06.00
|
|
struct endat_priv * endat_init(struct endat_pruss_xchg *pruss_xchg, void *pruss_cfg, int32_t slice)
Initialize EnDat firmware interface address and get the pointer to struct endat_priv instance.
void endat_command_send(struct endat_priv *priv)
trigger sending the EnDat command in PRU
void endat_config_multi_channel_mask(struct endat_priv *priv, uint8_t mask, uint8_t loadshare)
select mask of channels to be used in multi channel configuration by EnDat master
void endat_config_primary_core_mask(struct endat_priv *priv, uint8_t mask)
set a core as primay core for global configuration, clk configuration and TX_GLOBAL_INIT
int32_t endat_wait_initialization(struct endat_priv *priv, uint32_t timeout, uint8_t mask)
wait for EnDat master firmware to initialize
int32_t endat_get_2_2_angle(struct endat_priv *priv)
Read EnDat 2.2 angular position in steps for rotary encoders (prior to invoking this,...
void endat_multi_channel_set_cur(struct endat_priv *priv, int32_t ch)
In multi channel configuration, select channel before receive processing in multi channel configura...
void endat_addinfo_track(struct endat_priv *priv, int32_t cmd, struct cmd_supplement *cmd_supplement)
track presence of additional information in priv
Definition: endat_drv.h:132
void endat_config_channel(struct endat_priv *priv, int32_t ch)
select channel to be used by EnDat master
uint32_t endat_recvd_validate(struct endat_priv *priv, int32_t cmd, union endat_format_data *u)
CRC result indicated in return value as follows, 0th bit high position/address/params/test CRC succ...
int32_t endat_command_process(struct endat_priv *priv, int32_t cmd, struct cmd_supplement *cmd_supplement)
send the EnDat command and wait till firmware acknowledges
void endat_stop_continuous_mode(struct endat_priv *priv)
stop continuous mode
void endat_config_syn_bits(struct endat_priv *priv, uint8_t mask)
int32_t endat_start_continuous_mode(struct endat_priv *priv)
start continuous mode
struct endat_pruss_xchg * pruss_xchg
Definition: endat_drv.h:152
void endat_config_tst_delay(struct endat_priv *priv, uint16_t delay)
configure tST delay
Definition: endat_drv.h:103
void endat_enable_load_share_mode(struct endat_priv *priv)
enable load share mode if encoders has diffent make
int32_t endat_recvd_process(struct endat_priv *priv, int32_t cmd, union endat_format_data *u)
process raw recieved data and format based on the command
uint32_t endat_get_prop_delay(struct endat_priv *priv)
get propagation delay automatically estimated by the firmware
void endat_config_clock(struct endat_priv *priv, struct endat_clk_cfg *clk_cfg)
configure EnDat clock
void endat_config_rx_arm_cnt(struct endat_priv *priv, uint16_t val)
configure rx arm counter
uint32_t endat_get_recovery_time(struct endat_priv *priv)
read RT from DMEM
int32_t endat_command_build(struct endat_priv *priv, int32_t cmd, struct cmd_supplement *cmd_supplement)
setup the EnDat command in the PRU interface buffer
void endat_command_wait(struct endat_priv *priv)
wait till PRU finishes EnDat transaction
void * pruss_cfg
Definition: endat_drv.h:154
int32_t endat_get_encoder_info(struct endat_priv *priv)
update priv with position resolution, id, serial number, encoder type and supported command set
void endat_config_periodic_trigger(struct endat_priv *priv)
configure EnDat master in periodic trigger mode
void endat_config_host_trigger(struct endat_priv *priv)
configure EnDat master for host trigger mode
Definition: endat_drv.h:158
void endat_config_wire_delay(struct endat_priv *priv, uint16_t val)
configure wire delay for the selected channel
void endat_config_rx_clock_disable(struct endat_priv *priv, uint16_t val)
configure clocks to be disabled at the end of rx to account for tD
uint8_t endat_multi_channel_detected(struct endat_priv *priv)
select channels detected in multi channel configuration by EnDat master. required to be invoked onl...