SAMV71 Xplained Ultra Software Package 1.5

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.
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.

Detailed Description

Interface for Synchronous Serial (SSC) controller.

Definition in file ssc.h.


Function Documentation

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:
ssc Pointer to an SSC instance.
bitRate bit rate.
masterClock master clock.

Definition at line 87 of file ssc.c.

Here is the call graph for this function:

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

Configures the receiver of a SSC peripheral.

Parameters:
ssc Pointer to an SSC instance.
rcmr Receive Clock Mode Register value.
rfmr Receive Frame Mode Register value.

Definition at line 125 of file ssc.c.

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

Configures the transmitter of a SSC peripheral.

Parameters:
ssc Pointer to an SSC instance.
tcmr Transmit Clock Mode Register value.
tfmr Transmit Frame Mode Register value.

Definition at line 113 of file ssc.c.

void SSC_DisableInterrupts ( Ssc ssc,
uint32_t  sources 
)

Disables one or more interrupt sources of a SSC peripheral.

Parameters:
ssc Pointer to an SSC instance.
sources Bitwise OR of selected interrupt sources.

Definition at line 182 of file ssc.c.

void SSC_DisableReceiver ( Ssc ssc  ) 

Disables the receiver of a SSC peripheral.

Parameters:
ssc Pointer to an SSC instance.

Definition at line 162 of file ssc.c.

void SSC_DisableTransmitter ( Ssc ssc  ) 

Disables the transmitter of a SSC peripheral.

Parameters:
ssc Pointer to an SSC instance.

Definition at line 144 of file ssc.c.

void SSC_EnableInterrupts ( Ssc ssc,
uint32_t  sources 
)

Enables one or more interrupt sources of a SSC peripheral.

Parameters:
ssc Pointer to an SSC instance.
sources Bitwise OR of selected interrupt sources.

Definition at line 172 of file ssc.c.

void SSC_EnableReceiver ( Ssc ssc  ) 

Enables the receiver of a SSC peripheral.

Parameters:
ssc Pointer to an SSC instance.

Definition at line 153 of file ssc.c.

void SSC_EnableTransmitter ( Ssc ssc  ) 

Enables the transmitter of a SSC peripheral.

Parameters:
ssc Pointer to an SSC instance.

Definition at line 135 of file ssc.c.

uint8_t SSC_IsRxReady ( Ssc ssc  ) 

Return 1 if one frame is received, 0 otherwise.

Parameters:
ssc Pointer to an SSC instance.

Definition at line 215 of file ssc.c.

uint32_t SSC_Read ( Ssc ssc  ) 

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

Parameters:
ssc Pointer to an SSC instance.

Definition at line 204 of file ssc.c.

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:
ssc Pointer to an SSC instance.
frame Data frame to send.

Definition at line 193 of file ssc.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines