From 6c60869409ade7707587f50d15b776fe7deadc8c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 27 Jun 2016 12:36:21 -0700 Subject: [PATCH] Support DAC_OR_ADDRESS in Printrboard too --- Marlin/dac_mcp4728.h | 4 +++- Marlin/pins_PRINTRBOARD_REVF.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Marlin/dac_mcp4728.h b/Marlin/dac_mcp4728.h index e1739c5630..1f659bf882 100644 --- a/Marlin/dac_mcp4728.h +++ b/Marlin/dac_mcp4728.h @@ -50,7 +50,9 @@ #define GAINWRITE 0B11000000 // This is taken from the original lib, makes it easy to edit if needed -#define DAC_DEV_ADDRESS (BASE_ADDR | 0x00) +// DAC_OR_ADDRESS defined in pins_BOARD.h file +#define DAC_DEV_ADDRESS (BASE_ADDR | DAC_OR_ADDRESS) + void mcp4728_init(); uint8_t mcp4728_analogWrite(uint8_t channel, uint16_t value); diff --git a/Marlin/pins_PRINTRBOARD_REVF.h b/Marlin/pins_PRINTRBOARD_REVF.h index c6773466fe..799eb37c63 100644 --- a/Marlin/pins_PRINTRBOARD_REVF.h +++ b/Marlin/pins_PRINTRBOARD_REVF.h @@ -89,6 +89,7 @@ #define DAC_STEPPER_MAX 3520 #define DAC_STEPPER_VREF 1 //internal Vref, gain 1x = 2.048V #define DAC_STEPPER_GAIN 0 +#define DAC_OR_ADDRESS 0x00 #if DISABLED(SDSUPPORT) // these pins are defined in the SD library if building with SD support