MityDSP Documentation Index

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] mnMcBSPDevNum McBDSP 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_Hz Desired chip SCLK rate, in Hz, Max 30 MHz (default 12.5 MHz)
[in] anFSample_Hz Desired output rate (per channel), in Hz (default 12.5 KHz)
[in] anHWVector DSP 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] SampleA the value for the A DAC output channel
[in] SampleB the value for the B DAC output channel
[in,out] ahDataOutputSem The 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  )  [static, protected]

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

Parameters:
[in] apThis Pointer 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

the McBSP running port number

CSL Handle to McBSP.

volatile SEM_Handle MityDSP::tcDspDac8532McBsp::mhDataOutputSem [protected]

semaphore handle to post for continous capture

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]
unsigned int MityDSP::tcDspDac8532McBsp::mnIntCount [protected]
unsigned int MityDSP::tcDspDac8532McBsp::mnIdleCount [protected]

  
Generated on Fri Sep 23 16:33:48 2011 for MityDSP Core by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.