Skip to content

Commit

Permalink
AP_ADC: allow hwdef to set I2C addr and bus
Browse files Browse the repository at this point in the history
  • Loading branch information
magicrub committed Mar 14, 2024
1 parent f6b9800 commit 35821f9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libraries/AP_ADC/AP_ADC_ADS1115.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@
#define ADS1115_ADDRESS_ADDR_SDA 0x4A // address pin tied to SDA pin
#define ADS1115_ADDRESS_ADDR_SCL 0x4B // address pin tied to SCL pin

#ifndef ADS1115_I2C_ADDR
#define ADS1115_I2C_ADDR ADS1115_ADDRESS_ADDR_GND
#endif

#ifndef ADS1115_I2C_BUS
#define ADS1115_I2C_BUS 1
#endif

#define ADS1115_RA_CONVERSION 0x00
#define ADS1115_RA_CONFIG 0x01
Expand Down

0 comments on commit 35821f9

Please sign in to comment.