Go to the source code of this file.
Data Structures | |
struct | tamagawa_ch_info |
Structure defining tamagawa per channel interface. More... | |
struct | tamagawa_cmd |
Structure defining Tamagawa command interface. More... | |
struct | tamagawa_config |
Structure defining Tamagawa configuration interface. More... | |
struct | rx_frames_received |
Tamagawa Interface Received data. More... | |
struct | tamagawa_interface |
Tamagawa Interface. More... | |
struct | config |
struct | tamagawa_eeprom_interface |
Tamagawa EEPROM Interface. More... | |
struct | tamagawa_xchg |
Structure defining Tamagawa interface. More... | |
struct | tamagawa_clk_cfg |
Used to configure the Tamagawa Clock. More... | |
struct | register_offsets |
Used to store the register offsets depending on different PRU slices. More... | |
struct | tamagawa_priv |
Used to structures defining the Tamagawa interface, PRU slice and register offsets. More... | |
Macros | |
#define | TAMAGAWA_MULTI_CH0 (1 << 0) |
Used to set the value of Tamagawa multi-channel mask based on the whether the Channel 0 is selected or not. More... | |
#define | TAMAGAWA_MULTI_CH1 (1 << 1) |
Used to set the value of Tamagawa multi-channel mask based on the whether the Channel 1 is selected or not. More... | |
#define | TAMAGAWA_MULTI_CH2 (1 << 2) |
Used to set the value of Tamagawa multi-channel mask based on the whether the Channel 2 is selected or not. More... | |
#define | MAX_CHANNELS (3) |
Used to set the maximum channels supported. More... | |
#define | MAX_EEPROM_ADDRESS (127) |
Used to set the maximum address that can be used for EEPROM Read/Write. More... | |
#define | MAX_EEPROM_WRITE_DATA (255) |
Used to set the maximum value that can be written in EEPROM. More... | |
Enumerations | |
enum | data_id { DATA_ID_0, DATA_ID_1, DATA_ID_2, DATA_ID_3, DATA_ID_6, DATA_ID_7, DATA_ID_8, DATA_ID_C, DATA_ID_D, DATA_ID_NUM } |
Data ID codes. More... | |
Functions | |
int32_t | tamagawa_command_process (struct tamagawa_priv *priv, int32_t cmd, uint8_t gTamagawa_multi_ch_mask) |
send the tamagawa command and wait till firmware acknowledges More... | |
int32_t | tamagawa_command_build (struct tamagawa_priv *priv, int32_t cmd, uint8_t gTamagawa_multi_ch_mask) |
setup the tamagawa command in the PRU interface buffer More... | |
void | tamagawa_command_send (struct tamagawa_priv *priv) |
trigger sending the tamagawa command in PRU More... | |
void | tamagawa_command_wait (struct tamagawa_priv *priv) |
wait till PRU finishes tamagawa transaction More... | |
void | tamagawa_config_clock (struct tamagawa_priv *priv, struct tamagawa_clk_cfg *clk_cfg) |
configure tamagawa clock More... | |
void | tamagawa_config_host_trigger (struct tamagawa_priv *priv) |
configure tamagawa master for host trigger mode More... | |
void | tamagawa_config_periodic_trigger (struct tamagawa_priv *priv) |
configure tamagawa master in periodic trigger mode More... | |
void | tamagawa_config_channel (struct tamagawa_priv *priv, uint32_t ch) |
select channel to be used by tamagawa master More... | |
void | tamagawa_config_multi_channel_mask (struct tamagawa_priv *priv, uint8_t mask) |
select mask of channels to be used in multi channel configuration by tamagawa master More... | |
uint8_t | tamagawa_multi_channel_detected (struct tamagawa_priv *priv) |
select channels detected in multi channel configuration by tamagawa master. required to be invoked only if firmware indicates initialization failure to know the channels that has been detected. Initialization success implies that all channels indicated has been detected. More... | |
void | tamagawa_multi_channel_set_cur (struct tamagawa_priv *priv, uint32_t ch) |
In multi channel configuration, select channel before receive processing in multi channel configuration. After receive is complete, select each channel and invoke rx API's to parse data recieved in each channel. More... | |
struct tamagawa_priv * | tamagawa_init (struct tamagawa_xchg *tamagawa_xchg, void *pruss_cfg, uint32_t slice_value) |
Initialize tamagawa firmware interface address and get the pointer to struct tamagawa_priv instance. More... | |
void | tamagawa_update_data_id (struct tamagawa_priv *priv, int32_t cmd) |
update the current requested command id in tamagawa interface. More... | |
void | tamagawa_update_adf (struct tamagawa_priv *priv, uint32_t val, uint32_t ch) |
update the adf(address of EEPROM) field entered by user for EEPROM command in tamagawa interface. More... | |
void | tamagawa_update_edf (struct tamagawa_priv *priv, uint32_t val, uint32_t ch) |
update the edf(data for EEPROM) field entered by user for EEPROM command in tamagawa interface. More... | |
int32_t | tamagawa_parse (int32_t cmd, struct tamagawa_priv *priv) |
Parse the data in tamagawa interface. More... | |
int32_t | tamagawa_crc_verify (struct tamagawa_priv *priv) |
verify the CRC computed with the encoder crc. More... | |
void | tamagawa_update_crc (struct tamagawa_priv *priv, int32_t cmd, uint32_t ch) |
Pass the values of CF(Control Field), ADF(address of EEPROM) and EDF(data for EEPROM) to the CRC calculator fucntion and update the CRC field. More... | |
void | tamagawa_set_baudrate (struct tamagawa_priv *priv, double baudrate) |
Update the values for oversample rate and division factor for Tx and Rx. More... | |
void | tamagawa_eeprom_crc_reinit (struct tamagawa_priv *priv) |
Reset the values of the variables used in CRC calculation to 0. More... | |
uint32_t | tamagawa_reverse_bits (int8_t data) |
Reverse the bits of a number. More... | |
uint64_t | tamagawa_prepare_eeprom_tx_data (uint64_t eeprom_tx_data, volatile uint32_t data) |
Add the start and the stop bit to the reversed data. More... | |
void | tamagawa_prepare_eeprom_command (struct tamagawa_priv *priv, int32_t cmd, uint32_t ch) |
Prepare the required EEPROM command from the CF(Control Field), ADF(address of EEPROM) and EDF(data for EEPROM). More... | |