#include "chip.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
Implementation of Synchronous Serial (SSC) controller.
Definition in file ssc.c.
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 86 of file ssc.c.
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 124 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 112 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 181 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 161 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 143 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 171 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 152 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 134 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 212 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 202 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 192 of file ssc.c.