Rleg
2
|
Functions | |
int | enc_read_pos (int spi_dev, unsigned short int *data) |
READ POSITION. More... | |
int | enc_zero_set (int spi_dev) |
SET ZERO POINT. More... | |
int | enc_wait_for_ack (int spi_dev, uint8_t ack, int max_errors) |
send command and delay between reads More... | |
int enc_read_pos | ( | int | spi_dev, |
unsigned short int * | data | ||
) |
READ POSITION.
spi_dev | Communication Port | |
[in] | *data | Data to read |
Check this function, in case of error put delay before each byte data
Definition at line 37 of file encoder_functions.c.
References ARRAY_SIZE, enc_wait_for_ack(), ENCODER_NO_OP, ENCODER_RD_POS, FAILURE, INT_MAX, spi_trans_bytes(), and SUCCESS.
Referenced by read_all_data().
int enc_wait_for_ack | ( | int | spi_dev, |
uint8_t | ack, | ||
int | max_errors | ||
) |
send command and delay between reads
spi_dev | Communication Dev | |
[in] | data | Data to write |
Definition at line 73 of file encoder_functions.c.
References ENCODER_NO_OP, ENCODER_WAIT_RESP, FAILURE, spi_trans_bytes(), and SUCCESS.
Referenced by enc_read_pos(), and enc_zero_set().
int enc_zero_set | ( | int | spi_dev | ) |
SET ZERO POINT.
spi_dev | Communication Dev | |
[in] | data | Data to write |
Definition at line 19 of file encoder_functions.c.
References enc_wait_for_ack(), ENCODER_EEPROM_WR, ENCODER_SET_ZERO_PT, FAILURE, INT_MAX, spi_trans_bytes(), and SUCCESS.