RTEMS 6.1-rc6
|
#include "chip.h"
Functions | |
void | SSC_Configure (Ssc *ssc, uint32_t bitRate, uint32_t masterClock) |
Configures a SSC peripheral.If the divided clock is not used, the master clock frequency can be set to 0. | |
void | SSC_ConfigureTransmitter (Ssc *ssc, uint32_t tcmr, uint32_t tfmr) |
Configures the transmitter of a SSC peripheral. | |
void | SSC_ConfigureReceiver (Ssc *ssc, uint32_t rcmr, uint32_t rfmr) |
Configures the receiver of a SSC peripheral. | |
void | SSC_EnableTransmitter (Ssc *ssc) |
Enables the transmitter of a SSC peripheral. | |
void | SSC_DisableTransmitter (Ssc *ssc) |
Disables the transmitter of a SSC peripheral. | |
void | SSC_EnableReceiver (Ssc *ssc) |
Enables the receiver of a SSC peripheral. | |
void | SSC_DisableReceiver (Ssc *ssc) |
Disables the receiver of a SSC peripheral. | |
void | SSC_EnableInterrupts (Ssc *ssc, uint32_t sources) |
Enables one or more interrupt sources of a SSC peripheral. | |
void | SSC_DisableInterrupts (Ssc *ssc, uint32_t sources) |
Disables one or more interrupt sources of a SSC peripheral. | |
void | SSC_Write (Ssc *ssc, uint32_t frame) |
Sends one data frame through a SSC peripheral. If another frame is currently being sent, this function waits for the previous transfer to complete. | |
uint32_t | SSC_Read (Ssc *ssc) |
Waits until one frame is received on a SSC peripheral, and returns it. | |
uint8_t | SSC_IsRxReady (Ssc *ssc) |
Return 1 if one frame is received, 0 otherwise. | |
Implementation of Synchronous Serial (SSC) controller.
void SSC_Configure | ( | Ssc * | ssc, |
uint32_t | bitRate, | ||
uint32_t | masterClock | ||
) |
Configures a SSC peripheral.If the divided clock is not used, the master clock frequency can be set to 0.
ssc | Pointer to an SSC instance. |
bitRate | bit rate. |
masterClock | master clock. |
void SSC_ConfigureReceiver | ( | Ssc * | ssc, |
uint32_t | rcmr, | ||
uint32_t | rfmr | ||
) |
Configures the receiver of a SSC peripheral.
ssc | Pointer to an SSC instance. |
rcmr | Receive Clock Mode Register value. |
rfmr | Receive Frame Mode Register value. |
void SSC_ConfigureTransmitter | ( | Ssc * | ssc, |
uint32_t | tcmr, | ||
uint32_t | tfmr | ||
) |
Configures the transmitter of a SSC peripheral.
ssc | Pointer to an SSC instance. |
tcmr | Transmit Clock Mode Register value. |
tfmr | Transmit Frame Mode Register value. |
void SSC_DisableInterrupts | ( | Ssc * | ssc, |
uint32_t | sources | ||
) |
Disables one or more interrupt sources of a SSC peripheral.
ssc | Pointer to an SSC instance. |
sources | Bitwise OR of selected interrupt sources. |
void SSC_DisableReceiver | ( | Ssc * | ssc | ) |
Disables the receiver of a SSC peripheral.
ssc | Pointer to an SSC instance. |
void SSC_DisableTransmitter | ( | Ssc * | ssc | ) |
Disables the transmitter of a SSC peripheral.
ssc | Pointer to an SSC instance. |
void SSC_EnableInterrupts | ( | Ssc * | ssc, |
uint32_t | sources | ||
) |
Enables one or more interrupt sources of a SSC peripheral.
ssc | Pointer to an SSC instance. |
sources | Bitwise OR of selected interrupt sources. |
void SSC_EnableReceiver | ( | Ssc * | ssc | ) |
Enables the receiver of a SSC peripheral.
ssc | Pointer to an SSC instance. |
void SSC_EnableTransmitter | ( | Ssc * | ssc | ) |
Enables the transmitter of a SSC peripheral.
ssc | Pointer to an SSC instance. |
uint8_t SSC_IsRxReady | ( | Ssc * | ssc | ) |
Return 1 if one frame is received, 0 otherwise.
ssc | Pointer to an SSC instance. |
uint32_t SSC_Read | ( | Ssc * | ssc | ) |
Waits until one frame is received on a SSC peripheral, and returns it.
ssc | Pointer to an SSC instance. |
void SSC_Write | ( | Ssc * | ssc, |
uint32_t | frame | ||
) |
Sends one data frame through a SSC peripheral. If another frame is currently being sent, this function waits for the previous transfer to complete.
ssc | Pointer to an SSC instance. |
frame | Data frame to send. |