RTEMS  5.0.0
Functions
ssc.h File Reference
#include "chip.h"
#include <stdint.h>

Go to the source code of this file.

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. More...
 
void SSC_ConfigureTransmitter (Ssc *ssc, uint32_t tcmr, uint32_t tfmr)
 Configures the transmitter of a SSC peripheral. More...
 
void SSC_ConfigureReceiver (Ssc *ssc, uint32_t rcmr, uint32_t rfmr)
 Configures the receiver of a SSC peripheral. More...
 
void SSC_EnableTransmitter (Ssc *ssc)
 Enables the transmitter of a SSC peripheral. More...
 
void SSC_DisableTransmitter (Ssc *ssc)
 Disables the transmitter of a SSC peripheral. More...
 
void SSC_EnableReceiver (Ssc *ssc)
 Enables the receiver of a SSC peripheral. More...
 
void SSC_DisableReceiver (Ssc *ssc)
 Disables the receiver of a SSC peripheral. More...
 
void SSC_EnableInterrupts (Ssc *ssc, uint32_t sources)
 Enables one or more interrupt sources of a SSC peripheral. More...
 
void SSC_DisableInterrupts (Ssc *ssc, uint32_t sources)
 Disables one or more interrupt sources of a SSC peripheral. More...
 
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. More...
 
uint32_t SSC_Read (Ssc *ssc)
 Waits until one frame is received on a SSC peripheral, and returns it. More...
 
uint8_t SSC_IsRxReady (Ssc *ssc)
 Return 1 if one frame is received, 0 otherwise. More...
 

Detailed Description

Interface for Synchronous Serial (SSC) controller.

Function Documentation

◆ SSC_Configure()

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.

Note
The emitter and transmitter are disabled by this function.
Parameters
sscPointer to an SSC instance.
bitRatebit rate.
masterClockmaster clock.

◆ SSC_ConfigureReceiver()

void SSC_ConfigureReceiver ( Ssc ssc,
uint32_t  rcmr,
uint32_t  rfmr 
)

Configures the receiver of a SSC peripheral.

Parameters
sscPointer to an SSC instance.
rcmrReceive Clock Mode Register value.
rfmrReceive Frame Mode Register value.

◆ SSC_ConfigureTransmitter()

void SSC_ConfigureTransmitter ( Ssc ssc,
uint32_t  tcmr,
uint32_t  tfmr 
)

Configures the transmitter of a SSC peripheral.

Parameters
sscPointer to an SSC instance.
tcmrTransmit Clock Mode Register value.
tfmrTransmit Frame Mode Register value.

◆ SSC_DisableInterrupts()

void SSC_DisableInterrupts ( Ssc ssc,
uint32_t  sources 
)

Disables one or more interrupt sources of a SSC peripheral.

Parameters
sscPointer to an SSC instance.
sourcesBitwise OR of selected interrupt sources.

◆ SSC_DisableReceiver()

void SSC_DisableReceiver ( Ssc ssc)

Disables the receiver of a SSC peripheral.

Parameters
sscPointer to an SSC instance.

◆ SSC_DisableTransmitter()

void SSC_DisableTransmitter ( Ssc ssc)

Disables the transmitter of a SSC peripheral.

Parameters
sscPointer to an SSC instance.

◆ SSC_EnableInterrupts()

void SSC_EnableInterrupts ( Ssc ssc,
uint32_t  sources 
)

Enables one or more interrupt sources of a SSC peripheral.

Parameters
sscPointer to an SSC instance.
sourcesBitwise OR of selected interrupt sources.

◆ SSC_EnableReceiver()

void SSC_EnableReceiver ( Ssc ssc)

Enables the receiver of a SSC peripheral.

Parameters
sscPointer to an SSC instance.

◆ SSC_EnableTransmitter()

void SSC_EnableTransmitter ( Ssc ssc)

Enables the transmitter of a SSC peripheral.

Parameters
sscPointer to an SSC instance.

◆ SSC_IsRxReady()

uint8_t SSC_IsRxReady ( Ssc ssc)

Return 1 if one frame is received, 0 otherwise.

Parameters
sscPointer to an SSC instance.

◆ SSC_Read()

uint32_t SSC_Read ( Ssc ssc)

Waits until one frame is received on a SSC peripheral, and returns it.

Parameters
sscPointer to an SSC instance.

◆ SSC_Write()

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.

Parameters
sscPointer to an SSC instance.
frameData frame to send.