
LTC3351 C Library
==============================

Introduction:
-------------

This  C library includes headers and several functions to simplify communication
with  the  LTC3351.  This  low  level library provides a header file with the
definitions  of registers and bit fields within those registers, and routines to
read and write those registers and individual bit-fields.

Files:
------

LTC3351_reg_defs.h - Header file containing definitions of registers and bit
fields in the LTC3351.  Names and addresses of registers are defined here.
Names, addresses, sizes, offsets, and masks are defined for bit fields in the
LTC3351.  This information is also packed into a definition that is used by
LTC3351.c

LTC3351.c - Functions to initialize a LTC3351 instance, read and write
registers and bit-fields

LTC3351.h - Header file defining prototypes, data structures and constants
used by LTC3351.c

LTC3351_formats.h - File defining constants and macros that can be used by
LTC3351.c to convert real values to LTC3351 integer values at compile-time
(optimized away) and to convert LTC3351 integer values to real values at run-time
for UI display or debug (floating point arithmetic required).

LTC3351_pec.c - File containing bit-wise and table lookup CRC-8 functions to
compute SMBus Packet Error Check byte.

LTC3351_pec.h - File containing Packet Error Check function headers.

LTC3351_example_dummy.c - An example showing how to use the LTC3351.c
library. Dummy functions containing print statements are used in place of
hardware reads and writes.

LTC3351_example_linux.c - An example using the Linux kernel i2c-dev
interface to communicate with the LTC3351

LTC3351_bf_config.c - An example re-writing all LTC3351 writable
bit fields to their power-on default state. Can be used as a template to
quickly modify settings from their default.

LTC3351_reg_config.c - An example re-writing all LTC3351 writable
registers to their power-on default state. Can be used as a template to
quickly modify settings from their default. This program is smaller, but
less readable than LTC3351_bf_config.c.

LTC3351_example.ino - An example using the LT_SMBus Linduino library to
communicate with the LTC3351.  This example can also be easily adapted to
use other TWI/I2C/SMBus Arduino libraries. To build the Arduino project
successfully, the following files must be placed in a folder called
'LTC3351_example':
  LTC3351_example.ino
  LTC3351.c
  LTC3351.h
  LTC3351_formats.h
  LTC3351_reg_defs.h

Makefile - Makefile to build the examples.  Targets are dummy, linux and clean.
  "make dummy" builds LTC3351_example_dummy.c.
  "make linux" builds LTC3351_example_linux.c.
