| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions | Macros | Enumerations | Variables
DC2313A.ino File Reference
Digital Power System Management and Power Supply Supervisors » LTC2937: Six Channel Sequencer and Voltage Supervisor with EEPROM

Linear Technology DC2313A Demonstration. More...

## Detailed Description

Linear Technology DC2313A Demonstration.

LTC2937: Six Channel Sequencer and Voltage Supervisor with EEPROM

      Setup:
       Set the terminal baud rate to 115200 and select the newline terminator.

http://www.linear.com/product/LTC2937

http://www.linear.com/demo/DC2313A

Copyright 2018(c) Analog Devices, Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
- The use of this software may or may not infringe the patent rights of one or more patent holders. This license does not release you from the requirement that you obtain separate licenses from these patent holders to use this software.
- Use of the software either in source or binary form, must be run on or directly connected to an Analog Devices Inc. component.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file DC2313A.ino.

Go to the source code of this file.

## Functions
static void | setup ()
| Initialize Linduino. More...
static void | loop ()
| Main Linduino Loop. More...
static void | print_title ()
| Prints the title block when program first starts. More...
static void | print_prompt ()
| Prints main menu. More...
static int | ltc2937_config0 ()
| make sure that the LTC2937 is configured for I2C bus control More...
static int | ltc2937_restore ()
| restore the LTC2937 settings from EEPROM values More...
static int | ltc2937_store ()
| store the LTC2937 settings into EEPROM More...
static int | ltc2937_sequence_up ()
| sequence-up the LTC2937 More...
static int | ltc2937_sequence_down ()
| sequence-down the LTC2937 More...
static int | ltc2937_is_down ()
| indicate if the LTC2937 is in the sequenced-down state More...
static int | ltc2937_read_all_status ()
| read all status registers More...
static int | ltc2937_read_all_registers ()
| read all registers return int for success More...
static int | ltc2937_write_all_regs_dc_default ()
| write all registers to demo board defaults More...
static int | ltc2937_write_seq_regs ()
| write sequencing registers to a user-specified pattern More...
static int | ltc2937_is_write_protected ()
| Indicate if the part is write protected return 0 if the part is write enabled (hardware and software), 1 if it is protected. More...
static int | ltc2937_write_enable ()
| remove software write-protection report if the part is hardware write-protected More...
static int | ltc2937_set_breakpoint (uint16_t set_val)
| set the breakpoint to the given value More...
static int | ltc2937_inc_breakpoint ()
| increment the breakpoint by 1 More...
static int | ltc2937_print_seq_pos_count ()
| pretty-print the sequence_position_count register contents More...
static int | ltc2937_clear_breakpoint ()
| clear breakpoint register More...
static int | ltc2937_clear ()
| issue a clear command More...
static int | ltc2937_clear_fault_backup ()
| handle the backup word fault log (affects NVM and RAM) More...
static int | ltc2937_clear_alertb ()
| clear ALERTB pin More...
static int | ltc2937_pretty_print_monitor_backup ()
| pretty-print MONITOR_BACKUP More...
static int | ltc2937_pretty_print_monitor_status_history ()
| pretty-print MONITOR_STATUS_HISTORY More...
static int | ltc2937_pretty_print_monitor_status ()
| pretty-print MONITOR_STATUS More...
static int | ltc2937_pretty_print_status_information ()
| pretty-print STATUS_INFORMATION More...

## Macros
#define | LTC2937_I2C_ADDRESS 0x36
#define | LTC2937_RESTORE_DELAY 10
#define | LTC2937_STORE_DELAY 120

## Enumerations
enum | return_values { SUCCEED =0, NOT_DOWN, WRITE_PROTECTED, FAIL }

## Variables
static uint8_t | ltc2937_i2c_address
static LT_SMBusNoPec * | smbus = new LT_SMBusNoPec()

## Function Documentation

## ◆ loop()

static void loop | ( | void |  | ) |
| static

Main Linduino Loop.

Returns
  void

Definition at line 110 of file DC2313A.ino.

## ◆ ltc2937_clear()

static int ltc2937_clear | ( |  | ) |
| static

issue a clear command

Returns
  int indicating failure mode

Definition at line 937 of file DC2313A.ino.

## ◆ ltc2937_clear_alertb()

static int ltc2937_clear_alertb | ( |  | ) |
| static

clear ALERTB pin

Returns
  int for success

Definition at line 1025 of file DC2313A.ino.

## ◆ ltc2937_clear_breakpoint()

static int ltc2937_clear_breakpoint | ( |  | ) |
| static

clear breakpoint register

Returns
  int indicating failure mode

Definition at line 922 of file DC2313A.ino.

## ◆ ltc2937_clear_fault_backup()

static int ltc2937_clear_fault_backup | ( |  | ) |
| static

handle the backup word fault log (affects NVM and RAM)

Returns
  int indicating failure mode

Definition at line 969 of file DC2313A.ino.

## ◆ ltc2937_config0()

static int ltc2937_config0 | ( |  | ) |
| static

make sure that the LTC2937 is configured for I2C bus control

Returns
  int for success

Definition at line 273 of file DC2313A.ino.

## ◆ ltc2937_inc_breakpoint()

static int ltc2937_inc_breakpoint | ( |  | ) |
| static

increment the breakpoint by 1

Returns
  int for failure mode

Definition at line 853 of file DC2313A.ino.

## ◆ ltc2937_is_down()

static int ltc2937_is_down | ( |  | ) |
| static

indicate if the LTC2937 is in the sequenced-down state

Returns
  int for part staus

Definition at line 380 of file DC2313A.ino.

## ◆ ltc2937_is_write_protected()

static int ltc2937_is_write_protected | ( |  | ) |
| static

Indicate if the part is write protected return 0 if the part is write enabled (hardware and software), 1 if it is protected.

Definition at line 773 of file DC2313A.ino.

## ◆ ltc2937_pretty_print_monitor_backup()

static int ltc2937_pretty_print_monitor_backup | ( |  | ) |
| static

pretty-print MONITOR_BACKUP

Returns
  int for success

Definition at line 1033 of file DC2313A.ino.

## ◆ ltc2937_pretty_print_monitor_status()

static int ltc2937_pretty_print_monitor_status | ( |  | ) |
| static

pretty-print MONITOR_STATUS

Returns
  int for success

Definition at line 1359 of file DC2313A.ino.

## ◆ ltc2937_pretty_print_monitor_status_history()

static int ltc2937_pretty_print_monitor_status_history | ( |  | ) |
| static

pretty-print MONITOR_STATUS_HISTORY

Returns
  int for success

Definition at line 1196 of file DC2313A.ino.

## ◆ ltc2937_pretty_print_status_information()

static int ltc2937_pretty_print_status_information | ( |  | ) |
| static

pretty-print STATUS_INFORMATION

Returns
  int for success

Definition at line 1501 of file DC2313A.ino.

## ◆ ltc2937_print_seq_pos_count()

static int ltc2937_print_seq_pos_count | ( |  | ) |
| static

pretty-print the sequence_position_count register contents

Returns
  int for success

Definition at line 890 of file DC2313A.ino.

## ◆ ltc2937_read_all_registers()

static int ltc2937_read_all_registers | ( |  | ) |
| static

read all registers return int for success

Definition at line 468 of file DC2313A.ino.

## ◆ ltc2937_read_all_status()

static int ltc2937_read_all_status | ( |  | ) |
| static

read all status registers

Returns
  int for success

Definition at line 414 of file DC2313A.ino.

## ◆ ltc2937_restore()

static int ltc2937_restore | ( |  | ) |
| static

restore the LTC2937 settings from EEPROM values

Returns
  int for success

Definition at line 293 of file DC2313A.ino.

## ◆ ltc2937_sequence_down()

static int ltc2937_sequence_down | ( |  | ) |
| static

sequence-down the LTC2937

Returns
  int for success

Definition at line 360 of file DC2313A.ino.

## ◆ ltc2937_sequence_up()

static int ltc2937_sequence_up | ( |  | ) |
| static

sequence-up the LTC2937

Returns
  int for success

Definition at line 339 of file DC2313A.ino.

## ◆ ltc2937_set_breakpoint()

static int ltc2937_set_breakpoint | ( | uint16_t | set_val | ) |
| static

set the breakpoint to the given value

Returns
  int for failure mode

Definition at line 823 of file DC2313A.ino.

## ◆ ltc2937_store()

static int ltc2937_store | ( |  | ) |
| static

store the LTC2937 settings into EEPROM

Returns
  int for success

Definition at line 316 of file DC2313A.ino.

## ◆ ltc2937_write_all_regs_dc_default()

static int ltc2937_write_all_regs_dc_default | ( |  | ) |
| static

write all registers to demo board defaults

Returns
  int for failure mode

Definition at line 648 of file DC2313A.ino.

## ◆ ltc2937_write_enable()

static int ltc2937_write_enable | ( |  | ) |
| static

remove software write-protection report if the part is hardware write-protected

Returns
  int for failure mode

Definition at line 797 of file DC2313A.ino.

## ◆ ltc2937_write_seq_regs()

static int ltc2937_write_seq_regs | ( |  | ) |
| static

write sequencing registers to a user-specified pattern

Returns
  int for failure mode

Definition at line 710 of file DC2313A.ino.

## ◆ print_prompt()

static void print_prompt | ( |  | ) |
| static

Prints main menu.

Returns
  void

Definition at line 251 of file DC2313A.ino.

## ◆ print_title()

static void print_title | ( | void |  | ) |
| static

Prints the title block when program first starts.

Returns
  void

Definition at line 236 of file DC2313A.ino.

## ◆ setup()

static void setup | ( | void |  | ) |
| static

Initialize Linduino.

Returns
  void

Definition at line 94 of file DC2313A.ino.

## Macro Definition Documentation

## ◆ LTC2937_I2C_ADDRESS

#define LTC2937_I2C_ADDRESS 0x36

Definition at line 66 of file DC2313A.ino.

## ◆ LTC2937_RESTORE_DELAY

#define LTC2937_RESTORE_DELAY 10

Definition at line 88 of file DC2313A.ino.

## ◆ LTC2937_STORE_DELAY

#define LTC2937_STORE_DELAY 120

Definition at line 89 of file DC2313A.ino.

## Enumeration Type Documentation

## ◆ return_values

enum return_values

Enumerator
SUCCEED |
NOT_DOWN |
WRITE_PROTECTED |
FAIL |

Definition at line 81 of file DC2313A.ino.

## Variable Documentation

## ◆ ltc2937_i2c_address

uint8_t ltc2937_i2c_address
| static

Definition at line 72 of file DC2313A.ino.

## ◆ smbus

LT_SMBusNoPec* smbus = new LT_SMBusNoPec()
| static

Definition at line 77 of file DC2313A.ino.