MityDSP Documentation Index
Classes | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes
MityDSP::tcDspDac8532McBsp Class Reference

Instances of this class create an interface to an ADS834x 16-bit analog to digital converter. More...

#include <core/DspDac8532McBsp.h>

List of all members.

Classes

union  tuCtrlWord

Public Member Functions

 tcDspDac8532McBsp (int mnMcBSPDevNum, unsigned int anSCLKFreq_Hz=12500000, unsigned int anFOutput_Hz=12500, int anHWVector=9)
 This constructor is used to open a tcDspDac8532McBsp interface with the the specified settings (optional).
 ~tcDspDac8532McBsp ()
 Default destructor.
unsigned int SetSamples (unsigned short SampleA, unsigned short SampleB, SEM_Handle mhDataOutputSem)
 Set samples for the DAC.

Protected Types

enum  teSampleState { eeWritingA, eeWritingB, eeIDLE }

Protected Member Functions

void ISRHandler (void)
 Interrupt service routine handler for tcDspDac8532McBsp object.

Static Protected Member Functions

static void DispatchISRHandler (Arg apThis)
 Static convenience function to display interrupt handler for McBSP Tx Ready condition.

Protected Attributes

unsigned int mnOutputRateHz
int mnDevNum
 the McBSP running port number
MCBSP_Handle mhMcBSPHandle
 CSL Handle to McBSP.
volatile SEM_Handle mhDataOutputSem
 semaphore handle to post for continous capture
volatile teSampleState meSampleState
volatile unsigned int mnSampleA
volatile unsigned int mnSampleB
volatile unsigned int mnNextSampleA
volatile unsigned int mnNextSampleB
volatile bool mbNextSampleSet
unsigned int mnIntCount
unsigned int mnIdleCount

Detailed Description

Instances of this class create an interface to an ADS834x 16-bit analog to digital converter.

See also:
tcDspDac8532McBsp Page

Member Enumeration Documentation

Enumerator:
eeWritingA 
eeWritingB 
eeIDLE 

Constructor & Destructor Documentation

tcDspDac8532McBsp::tcDspDac8532McBsp ( int  mnMcBSPDevNum,
unsigned int  anSCLKFreq_Hz = 12500000,
unsigned int  anFSample_Hz = 12500,
int  anHWVector = 9 
)

This constructor is used to open a tcDspDac8532McBsp interface with the the specified settings (optional).

Parameters:
[in]mnMcBSPDevNumMcBDSP Number as defined by CSL (MCBSP_DEV0 or MCBSP_DEV1 for MityDSP/XM) (CSL_MCBSP_0 or CSL_MCBSP_1 for MityDSP-PRO)
[in]anSCLKFreq_HzDesired chip SCLK rate, in Hz, Max 30 MHz (default 12.5 MHz)
[in]anFSample_HzDesired output rate (per channel), in Hz (default 12.5 KHz)
[in]anHWVectorDSP Interrupt vector number to use for McBSP interrups (default 9)
Note:
The SCLK rate must be evenly divisible by the cpu_clock / 2 (or 4 for the PRO)
Returns:
None.
See also:
DspDac8532McBsp.h
tcDspDac8532McBsp::~tcDspDac8532McBsp ( )

Default destructor.

Returns:
None.

Member Function Documentation

unsigned int tcDspDac8532McBsp::SetSamples ( unsigned short  SampleA,
unsigned short  SampleB,
SEM_Handle  ahDataOutputSem 
)

Set samples for the DAC.

Parameters:
[in]SampleAthe value for the A DAC output channel
[in]SampleBthe value for the B DAC output channel
[in,out]ahDataOutputSemThe Semaphore that should be posted when the DAC outputs have been updated.
Returns:
zero on success
See also:
DspDac8532McBsp.h
void tcDspDac8532McBsp::DispatchISRHandler ( Arg  apThis)
staticprotected

Static convenience function to display interrupt handler for McBSP Tx Ready condition.

Parameters:
[in]apThisPointer to the valid tcDspDac8532McBsp controller class.
Returns:
None.
void tcDspDac8532McBsp::ISRHandler ( void  )
protected

Interrupt service routine handler for tcDspDac8532McBsp object.

Based on current state (writing A channel or B channel) will update then next DAC value and if B value is updated will transfer buffer to the DAC outputs.

Returns:
None.

Member Data Documentation

unsigned int MityDSP::tcDspDac8532McBsp::mnOutputRateHz
protected
int MityDSP::tcDspDac8532McBsp::mnDevNum
protected

the McBSP running port number

MCBSP_Handle MityDSP::tcDspDac8532McBsp::mhMcBSPHandle
protected

CSL Handle to McBSP.

volatile SEM_Handle MityDSP::tcDspDac8532McBsp::mhDataOutputSem
protected

semaphore handle to post for continous capture

volatile teSampleState MityDSP::tcDspDac8532McBsp::meSampleState
protected
volatile unsigned int MityDSP::tcDspDac8532McBsp::mnSampleA
protected
volatile unsigned int MityDSP::tcDspDac8532McBsp::mnSampleB
protected
volatile unsigned int MityDSP::tcDspDac8532McBsp::mnNextSampleA
protected
volatile unsigned int MityDSP::tcDspDac8532McBsp::mnNextSampleB
protected
volatile bool MityDSP::tcDspDac8532McBsp::mbNextSampleSet
protected
unsigned int MityDSP::tcDspDac8532McBsp::mnIntCount
protected
unsigned int MityDSP::tcDspDac8532McBsp::mnIdleCount
protected

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