RTEMS: bsps/arm/atsam/include/libchip/include/ssc.h File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
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.
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.

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

  ssc | Pointer to an SSC instance.
  bitRate | bit rate.
  masterClock | master clock.

## ◆ SSC_ConfigureReceiver()

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.

## ◆ SSC_ConfigureTransmitter()

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.

## ◆ SSC_DisableInterrupts()

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.

## ◆ SSC_DisableReceiver()

void SSC_DisableReceiver | ( | Ssc * | ssc | ) |

Disables the receiver of a SSC peripheral.

Parameters

  ssc | Pointer to an SSC instance.

## ◆ SSC_DisableTransmitter()

void SSC_DisableTransmitter | ( | Ssc * | ssc | ) |

Disables the transmitter of a SSC peripheral.

Parameters

  ssc | Pointer 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

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

## ◆ SSC_EnableReceiver()

void SSC_EnableReceiver | ( | Ssc * | ssc | ) |

Enables the receiver of a SSC peripheral.

Parameters

  ssc | Pointer to an SSC instance.

## ◆ SSC_EnableTransmitter()

void SSC_EnableTransmitter | ( | Ssc * | ssc | ) |

Enables the transmitter of a SSC peripheral.

Parameters

  ssc | Pointer to an SSC instance.

## ◆ SSC_IsRxReady()

uint8_t SSC_IsRxReady | ( | Ssc * | ssc | ) |

Return 1 if one frame is received, 0 otherwise.

Parameters

  ssc | Pointer 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

  ssc | Pointer 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

  ssc | Pointer to an SSC instance.
  frame | Data frame to send.