CC3200 Peripheral Driver Library User's Guide
1.2.0
|
Functions | |
void | I2SEnable (unsigned long ulBase, unsigned long ulMode) |
void | I2SDisable (unsigned long ulBase) |
void | I2SDataPut (unsigned long ulBase, unsigned long ulDataLine, unsigned long ulData) |
long | I2SDataPutNonBlocking (unsigned long ulBase, unsigned long ulDataLine, unsigned long ulData) |
void | I2SDataGet (unsigned long ulBase, unsigned long ulDataLine, unsigned long *pulData) |
long | I2SDataGetNonBlocking (unsigned long ulBase, unsigned long ulDataLine, unsigned long *pulData) |
void | I2SConfigSetExpClk (unsigned long ulBase, unsigned long ulI2SClk, unsigned long ulBitClk, unsigned long ulConfig) |
void | I2STxFIFOEnable (unsigned long ulBase, unsigned long ulTxLevel, unsigned long ulWordsPerTransfer) |
void | I2STxFIFODisable (unsigned long ulBase) |
void | I2SRxFIFOEnable (unsigned long ulBase, unsigned long ulRxLevel, unsigned long ulWordsPerTransfer) |
void | I2SRxFIFODisable (unsigned long ulBase) |
unsigned long | I2STxFIFOStatusGet (unsigned long ulBase) |
unsigned long | I2SRxFIFOStatusGet (unsigned long ulBase) |
void | I2SSerializerConfig (unsigned long ulBase, unsigned long ulDataLine, unsigned long ulSerMode, unsigned long ulInActState) |
void | I2SIntEnable (unsigned long ulBase, unsigned long ulIntFlags) |
void | I2SIntDisable (unsigned long ulBase, unsigned long ulIntFlags) |
unsigned long | I2SIntStatus (unsigned long ulBase) |
void | I2SIntClear (unsigned long ulBase, unsigned long ulStatFlags) |
void | I2SIntRegister (unsigned long ulBase, void(*pfnHandler)(void)) |
void | I2SIntUnregister (unsigned long ulBase) |
void | I2STxActiveSlotSet (unsigned long ulBase, unsigned long ulActSlot) |
void | I2SRxActiveSlotSet (unsigned long ulBase, unsigned long ulActSlot) |
void I2SConfigSetExpClk | ( | unsigned long | ulBase, |
unsigned long | ulI2SClk, | ||
unsigned long | ulBitClk, | ||
unsigned long | ulConfig | ||
) |
Sets the configuration of the I2S module.
ulBase | is the base address of the I2S module. |
ulI2SClk | is the rate of the clock supplied to the I2S module. |
ulBitClk | is the desired bit rate. |
ulConfig | is the data format. |
This function configures the I2S for operation in the specified data format. The bit rate is provided in the ulBitClk parameter and the data format in the ulConfig parameter.
The ulConfig parameter is the logical OR of three values: the slot size the data read/write port select, Master or Slave mode
Follwoing selects the Master-Slave mode -I2S_MODE_MASTER -I2S_MODE_SLAVE
Following selects the slot size: -I2S_SLOT_SIZE_24 -I2S_SLOT_SIZE_16
Following selects the data read/write port: -I2S_PORT_DMA -I2S_PORT_CPU
void I2SDataGet | ( | unsigned long | ulBase, |
unsigned long | ulDataLine, | ||
unsigned long * | pulData | ||
) |
Waits for data from the specified data line.
ulBase | is the base address of the I2S module. |
ulDataLine | is one of the valid data lines. |
pulData | is pointer to receive data variable. |
This function gets data from the receive register for the specified data line. If there are no data available, this function waits until a receive before returning.
long I2SDataGetNonBlocking | ( | unsigned long | ulBase, |
unsigned long | ulDataLine, | ||
unsigned long * | pulData | ||
) |
Receives data from the specified data line.
ulBase | is the base address of the I2S module. |
ulDataLine | is one of the valid data lines. |
pulData | is pointer to receive data variable. |
This function gets data from the receive register for the specified data line.
void I2SDataPut | ( | unsigned long | ulBase, |
unsigned long | ulDataLine, | ||
unsigned long | ulData | ||
) |
Waits to send data over the specified data line
ulBase | is the base address of the I2S module. |
ulDataLine | is one of the valid data lines. |
ulData | is the data to be transmitted. |
This function sends the ucData to the transmit register for the specified data line. If there is no space available, this function waits until there is space available before returning.
long I2SDataPutNonBlocking | ( | unsigned long | ulBase, |
unsigned long | ulDataLine, | ||
unsigned long | ulData | ||
) |
Sends data over the specified data line
ulBase | is the base address of the I2S module. |
ulDataLine | is one of the valid data lines. |
ulData | is the data to be transmitted. |
This function writes the ucData to the transmit register for the specified data line. This function does not block, so if there is no space available, then -1 is returned, and the application must retry the function later.
void I2SDisable | ( | unsigned long | ulBase | ) |
Disables transmit and/or receive.
ulBase | is the base address of the I2S module. |
This function disables transmit and/or receive from I2S module.
void I2SEnable | ( | unsigned long | ulBase, |
unsigned long | ulMode | ||
) |
Enables transmit and/or receive.
ulBase | is the base address of the I2S module. |
ulMode | is one of the valid modes. |
This function enables the I2S module in specified mode. The parameter ulMode should be one of the following
-I2S_MODE_TX_ONLY -I2S_MODE_TX_RX_SYNC
void I2SIntClear | ( | unsigned long | ulBase, |
unsigned long | ulStatFlags | ||
) |
Clears I2S interrupt sources.
ulBase | is the base address of the I2S module. |
ulStatFlags | is a bit mask of the interrupt sources to be cleared. |
The specified I2S interrupt sources are cleared, so that they no longer assert. This function must be called in the interrupt handler to keep the interrupt from being recognized again immediately upon exit.
The ulIntFlags parameter is the logical OR of any of the value describe in I2SIntStatus().
void I2SIntDisable | ( | unsigned long | ulBase, |
unsigned long | ulIntFlags | ||
) |
Disables individual I2S interrupt sources.
ulBase | is the base address of the I2S module. |
ulIntFlags | is the bit mask of the interrupt sources to be disabled. |
This function disables the indicated I2S interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.
The ulIntFlags parameter has the same definition as the ulIntFlags parameter to I2SIntEnable().
void I2SIntEnable | ( | unsigned long | ulBase, |
unsigned long | ulIntFlags | ||
) |
Enables individual I2S interrupt sources.
ulBase | is the base address of the I2S module. |
ulIntFlags | is the bit mask of the interrupt sources to be enabled. |
This function enables the indicated I2S interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.
The ulIntFlags parameter is the logical OR of any of the following:
-I2S_INT_XUNDRN -I2S_INT_XSYNCERR -I2S_INT_XLAST -I2S_INT_XDATA -I2S_INT_XSTAFRM -I2S_INT_XDMA -I2S_INT_ROVRN -I2S_INT_RSYNCERR -I2S_INT_RLAST -I2S_INT_RDATA -I2S_INT_RSTAFRM -I2S_INT_RDMA
void I2SIntRegister | ( | unsigned long | ulBase, |
void(*)(void) | pfnHandler | ||
) |
Registers an interrupt handler for a I2S interrupt.
ulBase | is the base address of the I2S module. |
pfnHandler | is a pointer to the function to be called when the I2S interrupt occurs. |
This function does the actual registering of the interrupt handler. This function enables the global interrupt in the interrupt controller; specific I2S interrupts must be enabled via I2SIntEnable(). It is the interrupt handler's responsibility to clear the interrupt source.
unsigned long I2SIntStatus | ( | unsigned long | ulBase | ) |
Gets the current interrupt status.
ulBase | is the base address of the I2S module. |
This function returns the raw interrupt status for I2S enumerated as a bit field of values: -I2S_STS_XERR -I2S_STS_XDMAERR -I2S_STS_XSTAFRM -I2S_STS_XDATA -I2S_STS_XLAST -I2S_STS_XSYNCERR -I2S_STS_XUNDRN -I2S_STS_XDMA -I2S_STS_RERR -I2S_STS_RDMAERR -I2S_STS_RSTAFRM -I2S_STS_RDATA -I2S_STS_RLAST -I2S_STS_RSYNCERR -I2S_STS_ROVERN -I2S_STS_RDMA
void I2SIntUnregister | ( | unsigned long | ulBase | ) |
Unregisters an interrupt handler for a I2S interrupt.
ulBase | is the base address of the I2S module. |
This function does the actual unregistering of the interrupt handler. It clears the handler to be called when a I2S interrupt occurs. This function also masks off the interrupt in the interrupt controller so that the interrupt handler no longer is called.
void I2SRxActiveSlotSet | ( | unsigned long | ulBase, |
unsigned long | ulActSlot | ||
) |
Set the active slots for Receiver
ulBase | is the base address of the I2S module. |
ulActSlot | is the bit-mask of activ slots |
This function sets the active slots for the receiver. By default both the slots are active. The parameter ulActSlot is logical OR follwoing values: -I2S_ACT_SLOT_EVEN -I2S_ACT_SLOT_ODD
void I2SRxFIFODisable | ( | unsigned long | ulBase | ) |
Disables receive FIFO.
ulBase | is the base address of the I2S module. |
This function disables the I2S receive FIFO.
void I2SRxFIFOEnable | ( | unsigned long | ulBase, |
unsigned long | ulRxLevel, | ||
unsigned long | ulWordsPerTransfer | ||
) |
Configure and enable receive FIFO.
ulBase | is the base address of the I2S module. |
ulRxLevel | is the receive FIFO DMA request level. |
ulWordsPerTransfer | is the nuber of words transferred from the FIFO. |
This function configures and enable I2S receive FIFO.
The parameter ulRxLevel sets the level at which receive DMA requests are generated. This should be non-zero integer multiple of number of serializers enabled as receivers.
The parameter ulWordsPerTransfer sets the number of words that are transferred to the receive FIFO from the data line(s). This value must equal the number of serializers used as receivers.
unsigned long I2SRxFIFOStatusGet | ( | unsigned long | ulBase | ) |
Get the receive FIFO status.
ulBase | is the base address of the I2S module. |
This function gets the number of 32-bit words currently in the receive FIFO.
void I2SSerializerConfig | ( | unsigned long | ulBase, |
unsigned long | ulDataLine, | ||
unsigned long | ulSerMode, | ||
unsigned long | ulInActState | ||
) |
Configure the serializer in specified mode.
ulBase | is the base address of the I2S module. |
ulDataLine | is the data line (serilizer) to be configured. |
ulSerMode | is the required serializer mode. |
ulInActState | sets the inactive state of the data line. |
This function configure and enable the serializer associated with the given data line in specified mode.
The paramenter ulDataLine selects to data line to be configured and can be one of the following: -I2S_DATA_LINE_0 -I2S_DATA_LINE_1
The parameter ulSerMode can be one of the following: -I2S_SER_MODE_TX -I2S_SER_MODE_RX -I2S_SER_MODE_DISABLE
The parameter ulInActState can be one of the following -I2S_INACT_TRI_STATE -I2S_INACT_LOW_LEVEL -I2S_INACT_LOW_HIGH
void I2STxActiveSlotSet | ( | unsigned long | ulBase, |
unsigned long | ulActSlot | ||
) |
Set the active slots for Trasmitter
ulBase | is the base address of the I2S module. |
ulActSlot | is the bit-mask of activ slots |
This function sets the active slots for the transmitter. By default both the slots are active. The parameter ulActSlot is logical OR follwoing values: -I2S_ACT_SLOT_EVEN -I2S_ACT_SLOT_ODD
void I2STxFIFODisable | ( | unsigned long | ulBase | ) |
Disables transmit FIFO.
ulBase | is the base address of the I2S module. |
This function disables the I2S transmit FIFO.
void I2STxFIFOEnable | ( | unsigned long | ulBase, |
unsigned long | ulTxLevel, | ||
unsigned long | ulWordsPerTransfer | ||
) |
Configure and enable transmit FIFO.
ulBase | is the base address of the I2S module. |
ulTxLevel | is the transmit FIFO DMA request level. |
ulWordsPerTransfer | is the nuber of words transferred from the FIFO. |
This function configures and enable I2S transmit FIFO.
The parameter ulTxLevel sets the level at which transmit DMA requests are generated. This should be non-zero integer multiple of number of serializers enabled as transmitters
The parameter ulWordsPerTransfer sets the number of words that are transferred from the transmit FIFO to the data line(s). This value must equal the number of serializers used as transmitters.
unsigned long I2STxFIFOStatusGet | ( | unsigned long | ulBase | ) |
Get the transmit FIFO status.
ulBase | is the base address of the I2S module. |
This function gets the number of 32-bit words currently in the transmit FIFO.