Maxim Integrated MAX5715 12-bit 4-channel voltage-output DAC
Dependents: MAX5715BOB_Tester MAX5715BOB_12bit_4ch_SPI_DAC MAX5715BOB_Serial_Tester
Diff: MAX5715.cpp
- Revision:
- 4:500c80398f90
- Parent:
- 3:a3f0518094f4
- Child:
- 5:7894decf9375
--- a/MAX5715.cpp Sun Aug 04 01:47:26 2019 -0700 +++ b/MAX5715.cpp Wed Aug 28 03:21:35 2019 -0700 @@ -936,7 +936,7 @@ // Sets the reference operating mode. // REF Power (B18): 0 = Internal reference is only powered if at least one DAC is powered // 1 = Internal reference is always powered -void MAX5715::REF(MAX5715_REF_enum_t value) +void MAX5715::REF(MAX5715_REF_enum_t ref) { //---------------------------------------- @@ -944,33 +944,33 @@ uint8_t command_regAddress = CMD_0111_0110_0000_0000_0000_0000_REF_AlwaysOn_2V048; // diagnostic uint16_t regValue = 0; // 0000_0000_0000_0000 // select command_regAddress from list of 8 values, based on condition - if (value == REF_EXT) { + if (ref == REF_EXT) { command_regAddress = CMD_0111_0000_0000_0000_0000_0000_REF_EXT; } - if (value == REF_2V500) { + if (ref == REF_2V500) { command_regAddress = CMD_0111_0001_0000_0000_0000_0000_REF_2V500; VRef = 2.500; } - if (value == REF_2V048) { + if (ref == REF_2V048) { command_regAddress = CMD_0111_0010_0000_0000_0000_0000_REF_2V048; VRef = 2.048; } - if (value == REF_4V096) { + if (ref == REF_4V096) { command_regAddress = CMD_0111_0011_0000_0000_0000_0000_REF_4V096; VRef = 4.096; } - if (value == REF_AlwaysOn_EXT) { + if (ref == REF_AlwaysOn_EXT) { command_regAddress = CMD_0111_0100_0000_0000_0000_0000_REF_AlwaysOn_EXT; } - if (value == REF_AlwaysOn_2V500) { + if (ref == REF_AlwaysOn_2V500) { command_regAddress = CMD_0111_0101_0000_0000_0000_0000_REF_AlwaysOn_2V500; VRef = 2.500; } - if (value == REF_AlwaysOn_2V048) { + if (ref == REF_AlwaysOn_2V048) { command_regAddress = CMD_0111_0110_0000_0000_0000_0000_REF_AlwaysOn_2V048; VRef = 2.048; } - if (value == REF_AlwaysOn_4V096) { + if (ref == REF_AlwaysOn_4V096) { command_regAddress = CMD_0111_0111_0000_0000_0000_0000_REF_AlwaysOn_4V096; VRef = 4.096; }