MityDSP Documentation Index
Public Member Functions | Public Attributes | Protected Attributes | Static Protected Attributes
MityDSP::tcDspTlv254x Class Reference

The tcDspTlv254x class is used to set up and receive data from a TI TLV254X family A-to-D converter. More...

#include <core/DspTlv254x.h>

List of all members.

Public Member Functions

 tcDspTlv254x (tcDspMcbsp *apMcbsp, tuCfrReg auCfg, tcDspOutputLatch *apLatch=NULL, unsigned int anCSID=0)
 This constructor is used to initialize a TLV254x A-to-D converter over a specified McBSP interface.
 ~tcDspTlv254x ()
 Default destructor.
void write_config_reg (tuCfrReg auCfg)
 This routine writes a new value to the TLV524X config register.
tuCfrReg read_config_reg (void)
 This routine reads the current TLV254X config register settings.
void request_data (unsigned short anChannel)
 This routine issues a single-shot conversion request from the specified channel of the TLV254x.
unsigned short read_data (void)
 This routine writes a FIFO read request to the TLV254x in order to retrieve data back from a previous request.

Public Attributes

unsigned long RxWords
unsigned long TxWords

Protected Attributes

tcDspMcbspmpMcbsp
 the mcbsp object
tcDspOutputLatchmpCS
 the CS latch object
tuCmrReg muCommand
 the command
tuCfrReg muConfig
 the config
tuResultsReg muResults
 the returned results
unsigned int mnCSID
 the CS ID

Static Protected Attributes

static const unsigned int gnNUM_INIT_CYCLES = 20000
 stall time for A2D init

Detailed Description

The tcDspTlv254x class is used to set up and receive data from a TI TLV254X family A-to-D converter.

The converter is accessed via a McBSP interface.

See also:
tcDspTlv254x Page

Constructor & Destructor Documentation

tcDspTlv254x::tcDspTlv254x ( tcDspMcbsp apMcbsp,
tuCfrReg  auCfg,
tcDspOutputLatch apLatch = NULL,
unsigned int  anCSID = 0 
)

This constructor is used to initialize a TLV254x A-to-D converter over a specified McBSP interface.

Parameters:
[in]apMcbspPointer to a McBSP interface object.
[in]auCfgA tuCfrReg structure for the desired configuration
[in]apLatchA pointer to a tcDspOutputLatch interface that contains control of the chip select line. This can be NULL.
[in]anCSIDThe ID for the ADC chip select in apLatch.
Note:
if NULL is provided as the apLatch, then the managing application must configure the chip select lines appropriately prior to constructing and accessing the read methods. Otherwise, the tcDspTlv254x class will request CS strobes appropriately.
Returns:
None.
tcDspTlv254x::~tcDspTlv254x ( )

Default destructor.


Member Function Documentation

void tcDspTlv254x::write_config_reg ( tuCfrReg  auCfg)

This routine writes a new value to the TLV524X config register.

Parameters:
[in]auCfgThe desired new configuration for the TLV524X.
Returns:
None.
tuCfrReg tcDspTlv254x::read_config_reg ( void  )

This routine reads the current TLV254X config register settings.

Returns:
A tuCfrReg structure containing the current configuration.
void tcDspTlv254x::request_data ( unsigned short  anChannel)

This routine issues a single-shot conversion request from the specified channel of the TLV254x.

Parameters:
[in]anChannelThe TLV254X channel to use.
Returns:
None.
unsigned short tcDspTlv254x::read_data ( void  )

This routine writes a FIFO read request to the TLV254x in order to retrieve data back from a previous request.

Note that the application code must wait long enough to issue this read to ensure that the request has been completed.

Returns:
The contents of the Results Register

Member Data Documentation

unsigned long MityDSP::tcDspTlv254x::RxWords
unsigned long MityDSP::tcDspTlv254x::TxWords
tcDspMcbsp* MityDSP::tcDspTlv254x::mpMcbsp
protected

the mcbsp object

tcDspOutputLatch* MityDSP::tcDspTlv254x::mpCS
protected

the CS latch object

tuCmrReg MityDSP::tcDspTlv254x::muCommand
protected

the command

tuCfrReg MityDSP::tcDspTlv254x::muConfig
protected

the config

tuResultsReg MityDSP::tcDspTlv254x::muResults
protected

the returned results

unsigned int MityDSP::tcDspTlv254x::mnCSID
protected

the CS ID

const unsigned int MityDSP::tcDspTlv254x::gnNUM_INIT_CYCLES = 20000
staticprotected

stall time for A2D init


  
Generated on Mon Apr 22 2013 11:33:04 for MityDSP Core by  Doxygen Version 1.8.1.1
Copyright © 2009, Critical Link LLC, All rights reserved.