Tiva Driver Lib
|
Functions | |
void | SSIConfigSetExpClk (uint32_t ui32Base, uint32_t ui32SSIClk, uint32_t ui32Protocol, uint32_t ui32Mode, uint32_t ui32BitRate, uint32_t ui32DataWidth) |
void | SSIEnable (uint32_t ui32Base) |
void | SSIDisable (uint32_t ui32Base) |
void | SSIIntRegister (uint32_t ui32Base, void(*pfnHandler)(void)) |
void | SSIIntUnregister (uint32_t ui32Base) |
void | SSIIntEnable (uint32_t ui32Base, uint32_t ui32IntFlags) |
void | SSIIntDisable (uint32_t ui32Base, uint32_t ui32IntFlags) |
uint32_t | SSIIntStatus (uint32_t ui32Base, bool bMasked) |
void | SSIIntClear (uint32_t ui32Base, uint32_t ui32IntFlags) |
void | SSIDataPut (uint32_t ui32Base, uint32_t ui32Data) |
int32_t | SSIDataPutNonBlocking (uint32_t ui32Base, uint32_t ui32Data) |
void | SSIDataGet (uint32_t ui32Base, uint32_t *pui32Data) |
int32_t | SSIDataGetNonBlocking (uint32_t ui32Base, uint32_t *pui32Data) |
void | SSIDMAEnable (uint32_t ui32Base, uint32_t ui32DMAFlags) |
void | SSIDMADisable (uint32_t ui32Base, uint32_t ui32DMAFlags) |
bool | SSIBusy (uint32_t ui32Base) |
void | SSIClockSourceSet (uint32_t ui32Base, uint32_t ui32Source) |
uint32_t | SSIClockSourceGet (uint32_t ui32Base) |
bool SSIBusy | ( | uint32_t | ui32Base | ) |
Determines whether the SSI transmitter is busy or not.
ui32Base | is the base address of the SSI port. |
This function allows the caller to determine whether all transmitted bytes have cleared the transmitter hardware. If false is returned, then the transmit FIFO is empty and all bits of the last transmitted word have left the hardware shift register.
uint32_t SSIClockSourceGet | ( | uint32_t | ui32Base | ) |
Gets the data clock source for the specified SSI peripheral.
ui32Base | is the base address of the SSI port. |
This function returns the data clock source for the specified SSI.
void SSIClockSourceSet | ( | uint32_t | ui32Base, |
uint32_t | ui32Source | ||
) |
Sets the data clock source for the specified SSI peripheral.
ui32Base | is the base address of the SSI port. |
ui32Source | is the baud clock source for the SSI. |
This function allows the baud clock source for the SSI to be selected. The possible clock source are the system clock (SSI_CLOCK_SYSTEM) or the precision internal oscillator (SSI_CLOCK_PIOSC).
Changing the baud clock source changes the data rate generated by the SSI. Therefore, the data rate should be reconfigured after any change to the SSI clock source.
void SSIConfigSetExpClk | ( | uint32_t | ui32Base, |
uint32_t | ui32SSIClk, | ||
uint32_t | ui32Protocol, | ||
uint32_t | ui32Mode, | ||
uint32_t | ui32BitRate, | ||
uint32_t | ui32DataWidth | ||
) |
Configures the synchronous serial interface.
ui32Base | specifies the SSI module base address. |
ui32SSIClk | is the rate of the clock supplied to the SSI module. |
ui32Protocol | specifies the data transfer protocol. |
ui32Mode | specifies the mode of operation. |
ui32BitRate | specifies the clock rate. |
ui32DataWidth | specifies number of bits transferred per frame. |
This function configures the synchronous serial interface. It sets the SSI protocol, mode of operation, bit rate, and data width.
The ui32Protocol parameter defines the data frame format. The ui32Protocol parameter can be one of the following values: SSI_FRF_MOTO_MODE_0, SSI_FRF_MOTO_MODE_1, SSI_FRF_MOTO_MODE_2, SSI_FRF_MOTO_MODE_3, SSI_FRF_TI, or SSI_FRF_NMW. The Motorola frame formats encode the following polarity and phase configurations:
Polarity Phase Mode 0 0 SSI_FRF_MOTO_MODE_0 0 1 SSI_FRF_MOTO_MODE_1 1 0 SSI_FRF_MOTO_MODE_2 1 1 SSI_FRF_MOTO_MODE_3
The ui32Mode parameter defines the operating mode of the SSI module. The SSI module can operate as a master or slave; if it is a slave, the SSI can be configured to disable output on its serial output line. The ui32Mode parameter can be one of the following values: SSI_MODE_MASTER, SSI_MODE_SLAVE, or SSI_MODE_SLAVE_OD.
The ui32BitRate parameter defines the bit rate for the SSI. This bit rate must satisfy the following clock ratio criteria:
where FSSI is the frequency of the clock supplied to the SSI module.
The ui32DataWidth parameter defines the width of the data transfers and can be a value between 4 and 16, inclusive.
The peripheral clock is the same as the processor clock. This value is returned by SysCtlClockGet(), or it can be explicitly hard coded if it is constant and known (to save the code/execution overhead of a call to SysCtlClockGet()).
void SSIDataGet | ( | uint32_t | ui32Base, |
uint32_t * | pui32Data | ||
) |
Gets a data element from the SSI receive FIFO.
ui32Base | specifies the SSI module base address. |
pui32Data | is a pointer to a storage location for data that was received over the SSI interface. |
This function gets received data from the receive FIFO of the specified SSI module and places that data into the location specified by the pui32Data parameter. If there is no data available, this function waits until data is received before returning.
int32_t SSIDataGetNonBlocking | ( | uint32_t | ui32Base, |
uint32_t * | pui32Data | ||
) |
Gets a data element from the SSI receive FIFO.
ui32Base | specifies the SSI module base address. |
pui32Data | is a pointer to a storage location for data that was received over the SSI interface. |
This function gets received data from the receive FIFO of the specified SSI module and places that data into the location specified by the ui32Data parameter. If there is no data in the FIFO, then this function returns a zero.
void SSIDataPut | ( | uint32_t | ui32Base, |
uint32_t | ui32Data | ||
) |
Puts a data element into the SSI transmit FIFO.
ui32Base | specifies the SSI module base address. |
ui32Data | is the data to be transmitted over the SSI interface. |
This function places the supplied data into the transmit FIFO of the specified SSI module. If there is no space available in the transmit FIFO, this function waits until there is space available before returning.
int32_t SSIDataPutNonBlocking | ( | uint32_t | ui32Base, |
uint32_t | ui32Data | ||
) |
Puts a data element into the SSI transmit FIFO.
ui32Base | specifies the SSI module base address. |
ui32Data | is the data to be transmitted over the SSI interface. |
This function places the supplied data into the transmit FIFO of the specified SSI module. If there is no space in the FIFO, then this function returns a zero.
void SSIDisable | ( | uint32_t | ui32Base | ) |
Disables the synchronous serial interface.
ui32Base | specifies the SSI module base address. |
This function disables operation of the synchronous serial interface.
void SSIDMADisable | ( | uint32_t | ui32Base, |
uint32_t | ui32DMAFlags | ||
) |
Disables SSI DMA operation.
ui32Base | is the base address of the SSI port. |
ui32DMAFlags | is a bit mask of the DMA features to disable. |
This function is used to disable SSI DMA features that were enabled by SSIDMAEnable(). The specified SSI DMA features are disabled. The ui32DMAFlags parameter is the logical OR of any of the following values:
void SSIDMAEnable | ( | uint32_t | ui32Base, |
uint32_t | ui32DMAFlags | ||
) |
Enables SSI DMA operation.
ui32Base | is the base address of the SSI port. |
ui32DMAFlags | is a bit mask of the DMA features to enable. |
This function enables the specified SSI DMA features. The SSI can be configured to use DMA for transmit and/or receive data transfers. The ui32DMAFlags parameter is the logical OR of any of the following values:
void SSIEnable | ( | uint32_t | ui32Base | ) |
Enables the synchronous serial interface.
ui32Base | specifies the SSI module base address. |
This function enables operation of the synchronous serial interface. The synchronous serial interface must be configured before it is enabled.
void SSIIntClear | ( | uint32_t | ui32Base, |
uint32_t | ui32IntFlags | ||
) |
Clears SSI interrupt sources.
ui32Base | specifies the SSI module base address. |
ui32IntFlags | is a bit mask of the interrupt sources to be cleared. |
This function clears the specified SSI interrupt sources so that they no longer assert. This function must be called in the interrupt handler to keep the interrupts from being triggered again immediately upon exit. The ui32IntFlags parameter can consist of either or both the SSI_RXTO and SSI_RXOR values.
void SSIIntDisable | ( | uint32_t | ui32Base, |
uint32_t | ui32IntFlags | ||
) |
Disables individual SSI interrupt sources.
ui32Base | specifies the SSI module base address. |
ui32IntFlags | is a bit mask of the interrupt sources to be disabled. |
This function disables the indicated SSI interrupt sources. The ui32IntFlags parameter can be any of the SSI_TXFF, SSI_RXFF, SSI_RXTO, or SSI_RXOR values.
void SSIIntEnable | ( | uint32_t | ui32Base, |
uint32_t | ui32IntFlags | ||
) |
Enables individual SSI interrupt sources.
ui32Base | specifies the SSI module base address. |
ui32IntFlags | is a bit mask of the interrupt sources to be enabled. |
This function enables the indicated SSI interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor. The ui32IntFlags parameter can be any of the SSI_TXFF, SSI_RXFF, SSI_RXTO, or SSI_RXOR values.
void SSIIntRegister | ( | uint32_t | ui32Base, |
void(*)(void) | pfnHandler | ||
) |
Registers an interrupt handler for the synchronous serial interface.
ui32Base | specifies the SSI module base address. |
pfnHandler | is a pointer to the function to be called when the synchronous serial interface interrupt occurs. |
This function registers the handler to be called when an SSI interrupt occurs. This function enables the global interrupt in the interrupt controller; specific SSI interrupts must be enabled via SSIIntEnable(). If necessary, it is the interrupt handler's responsibility to clear the interrupt source via SSIIntClear().
uint32_t SSIIntStatus | ( | uint32_t | ui32Base, |
bool | bMasked | ||
) |
Gets the current interrupt status.
ui32Base | specifies the SSI module base address. |
bMasked | is false if the raw interrupt status is required or true if the masked interrupt status is required. |
This function returns the interrupt status for the SSI module. Either the raw interrupt status or the status of interrupts that are allowed to reflect to the processor can be returned.
void SSIIntUnregister | ( | uint32_t | ui32Base | ) |
Unregisters an interrupt handler for the synchronous serial interface.
ui32Base | specifies the SSI module base address. |
This function clears the handler to be called when an SSI interrupt occurs. This function also masks off the interrupt in the interrupt controller so that the interrupt handler no longer is called.