Various compilation fixes for avr-gcc 10 (#9269)
This commit is contained in:
committed by
Drashna Jael're
parent
e33afb2255
commit
c16ddb3985
@@ -21,8 +21,6 @@
|
||||
#include <math.h>
|
||||
|
||||
uint8_t DRV2605L_transfer_buffer[2];
|
||||
uint8_t DRV2605L_tx_register[0];
|
||||
uint8_t DRV2605L_read_buffer[0];
|
||||
uint8_t DRV2605L_read_register;
|
||||
|
||||
void DRV_write(uint8_t drv_register, uint8_t settings) {
|
||||
@@ -32,16 +30,8 @@ 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
|
||||
i2c_readReg(DRV2605L_BASE_ADDRESS << 1, regaddress, &DRV2605L_read_register, 1, 100);
|
||||
|
||||
return DRV2605L_read_register;
|
||||
}
|
||||
|
||||
@@ -121,9 +111,7 @@ void DRV_rtp_init(void) {
|
||||
DRV_write(DRV_GO, 0x01);
|
||||
}
|
||||
|
||||
void DRV_amplitude(uint8_t amplitude) {
|
||||
DRV_write(DRV_RTP_INPUT, amplitude);
|
||||
}
|
||||
void DRV_amplitude(uint8_t amplitude) { DRV_write(DRV_RTP_INPUT, amplitude); }
|
||||
|
||||
void DRV_pulse(uint8_t sequence) {
|
||||
DRV_write(DRV_GO, 0x00);
|
||||
|
||||
@@ -24,7 +24,7 @@ __attribute__((weak)) float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_D4, 0.25
|
||||
__attribute__((weak)) float fauxclicky_released_note[2] = MUSICAL_NOTE(_C4, 0.125);
|
||||
__attribute__((weak)) float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C4, 0.25);
|
||||
|
||||
bool fauxclicky_enabled;
|
||||
extern bool fauxclicky_enabled;
|
||||
|
||||
//
|
||||
// tempo in BPM
|
||||
|
||||
Reference in New Issue
Block a user