55 buffer[0] = receive[0];
64 buffer[1] = receive[0];
66 *data = buffer[0]*256+buffer[1];
81 while (receive != ack) {
86 if (errors > max_errors) {
return FAILURE; }
#define ENCODER_EEPROM_WR
int enc_wait_for_ack(int spi_dev, uint8_t ack, int max_errors)
send command and delay between reads
int spi_trans_bytes(int spi_dev, uint8_t *send, uint8_t *receive, int n)
TRANSFER N BYTES.
int enc_zero_set(int spi_dev)
SET ZERO POINT.
#define ENCODER_WAIT_RESP
Rev 0 - 18/06/2013 RLEG project - 2013.
int enc_read_pos(int spi_dev, unsigned short int *data)
READ POSITION.
#define ENCODER_SET_ZERO_PT