Driver C++ source code for MAX5216/MAX5214 16-bit/14-bit DAC SPI (50MHz) bus ICs. Low power Digital-to_Analog Converter chips which accept supply voltages of 2.7V to 5.5V. Features Rail-to-Rail Buffered Output Operation and Safe Power-On Reset (POR) to Zero DAC Output.
Dependents: MAX5216_16_Bit_DAC_Hello_Code
Fork of MAX5487_Digital_Pot_Potentiometer_Rheostat_Resistor_Wiper by
Revision 7:1132d5fab5c7, committed 2018-09-06
- Comitter:
- phonemacro
- Date:
- Thu Sep 06 21:23:25 2018 +0000
- Parent:
- 6:cd8d96483262
- Commit message:
- Updated method names to comply with Mbed coding standard.
Changed in this revision
MAX5216.cpp | Show annotated file Show diff for this revision Revisions of this file |
MAX5216.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r cd8d96483262 -r 1132d5fab5c7 MAX5216.cpp --- a/MAX5216.cpp Sat Aug 18 09:36:53 2018 +0000 +++ b/MAX5216.cpp Thu Sep 06 21:23:25 2018 +0000 @@ -37,7 +37,7 @@ m_pin = 1; } -void MAX5216::writeCommand(setting_t setting, uint32_t value, pwrDwnMode_t mode) +void MAX5216::write_command(setting_t setting, uint32_t value, pwrDwnMode_t mode) { char val[3] = {0, 0, 0};
diff -r cd8d96483262 -r 1132d5fab5c7 MAX5216.h --- a/MAX5216.h Sat Aug 18 09:36:53 2018 +0000 +++ b/MAX5216.h Thu Sep 06 21:23:25 2018 +0000 @@ -78,11 +78,11 @@ * MAX5216 dac(spi, selectPin, MAX5216::MAX5216_IC); * spi.format(8,0); * spi.frequency(1000000); -* dac.writeCommand(MAX5216::WrtThru_Reg, 0xFFFF); +* dac.write_command(MAX5216::WrtThru_Reg, 0xFFFF); * wait(1.0); -* dac.writeCommand(MAX5216::WrtThru_Reg, 0x7FFF); +* dac.write_command(MAX5216::WrtThru_Reg, 0x7FFF); * wait(1.0); -* dac.writeCommand(MAX5216::PwrDwn_Reg, MAX5216::PwrDwnHiZ); +* dac.write_cmmand(MAX5216::PwrDwn_Reg, MAX5216::PwrDwnHiZ); * } * @endcode */ @@ -142,7 +142,7 @@ * Power Down Mode if PwrDwn_Reg commanded * @return void */ - void writeCommand(MAX5216::setting_t setting, uint32_t value, pwrDwnMode_t mode = PwrDwnNormalOp); + void write_command(MAX5216::setting_t setting, uint32_t value, pwrDwnMode_t mode = PwrDwnNormalOp); /************************************************************ * @brief Default destructor for MAX5216 Class.