summaryrefslogtreecommitdiff
path: root/drivers/haptic
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/haptic')
-rw-r--r--drivers/haptic/DRV2605L.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/haptic/DRV2605L.c b/drivers/haptic/DRV2605L.c
index c40731913b..830d629dae 100644
--- a/drivers/haptic/DRV2605L.c
+++ b/drivers/haptic/DRV2605L.c
@@ -32,16 +32,9 @@ void DRV_write(uint8_t drv_register, uint8_t settings) {
}
uint8_t DRV_read(uint8_t regaddress) {
-#ifdef __AVR__
i2c_readReg(DRV2605L_BASE_ADDRESS << 1, regaddress, DRV2605L_read_buffer, 1, 100);
DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
-#else
- DRV2605L_tx_register[0] = regaddress;
- if (MSG_OK != i2c_transmit_receive(DRV2605L_BASE_ADDRESS << 1, DRV2605L_tx_register, 1, DRV2605L_read_buffer, 1)) {
- printf("err reading reg \n");
- }
- DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
-#endif
+
return DRV2605L_read_register;
}
@@ -127,4 +120,4 @@ void DRV_pulse(uint8_t sequence) {
DRV_write(DRV_GO, 0x00);
DRV_write(DRV_WAVEFORM_SEQ_1, sequence);
DRV_write(DRV_GO, 0x01);
-} \ No newline at end of file
+}