MityDSP Documentation Index

tcDspMcbsp

Introduction

The tcDspMcbsp class is used for communications via the Texas Instruments Multichannel Buffered Serial Port (McBSP). The McBSP provides high-speed serial communication between the TI DSP chip and peripheral devices.

The tcDspMcbsp constructor takes a pointer to a base address for communication, as well as several transmit and receive parameters. These parameters can be adjusted at any time after creation of a tcDspMcbsp object by calling the member function reconfig(). Once configured, call the member functions read() and write() to read or write to the McBSP.

See also:
MityDSP::tcDspMcbsp Class Reference

Example

This is a simple example of tcDspMcbsp creation and usage:

 {
     static const int MCBSP_BASE_ADDR = 0x90000000;

     // Create a new tcDspMcbsp using default parameters
     tcDspMcbsp *mcbsp = new tcDspMcbsp (MCBSP_BASE_ADDR);

     // Change the word length to 16-bit
     mcbsp->change_word_length (WORD_LENGTH_16);

     // Read in 2 words
     unsigned int word1, word2;
     word1 = mcbsp->read();
     word2 = mcbsp->read();

     // Statistics should be updated to show two new received words
     if (mcbsp->mnRxWords == 2)
     {
         // Two words have been read
     }
     ...
 }

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