All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
DSPI µCOS/II Driver
DSPI: Serial Peripheral Interface Driver

## Overview

## Data Structures

struct | dspi_rtos_handle_t
| DSPI FreeRTOS handle. More...

## DSPI RTOS Operation

status_t | DSPI_RTOS_Init (dspi_rtos_handle_t *handle, SPI_Type *base, const dspi_master_config_t *masterConfig, uint32_t srcClock_Hz)
| Initializes DSPI. More...
status_t | DSPI_RTOS_Deinit (dspi_rtos_handle_t *handle)
| Deinitializes the DSPI. More...
status_t | DSPI_RTOS_Transfer (dspi_rtos_handle_t *handle, dspi_transfer_t *transfer)
| Performs SPI transfer. More...

## Data Structure Documentation

struct dspi_rtos_handle_t

DSPI µC/OS-III handle.

DSPI µC/OS-II handle.

### Data Fields

SPI_Type * | base
| DSPI base address.
dspi_master_handle_t | drv_handle
| Handle of the underlying driver, treated as opaque by the RTOS layer.
SemaphoreHandle_t | mutex
| Mutex to lock the handle during a transfer.
SemaphoreHandle_t | event
| Semaphore to notify and unblock task when transfer ends.
OS_EVENT * | mutex
| Mutex to lock the handle during a transfer.
OS_FLAG_GRP * | event
| Semaphore to notify and unblock task when transfer ends.
OS_SEM | mutex
| Mutex to lock the handle during a transfer.
OS_FLAG_GRP | event
| Semaphore to notify and unblock task when transfer ends.

## Function Documentation

status_t DSPI_RTOS_Init | ( | dspi_rtos_handle_t * | handle,
|  | SPI_Type * | base,
|  | const dspi_master_config_t * | masterConfig,
|  | uint32_t | srcClock_Hz
| ) |  |

This function initializes the DSPI module and the related RTOS context.

Parameters

  handle | The RTOS DSPI handle, the pointer to an allocated space for RTOS context.
  base | The pointer base address of the DSPI instance to initialize.
  masterConfig | Configuration structure to set-up DSPI in master mode.
  srcClock_Hz | Frequency of input clock of the DSPI module.

Returns
  status of the operation.

status_t DSPI_RTOS_Deinit | ( | dspi_rtos_handle_t * | handle | ) |

This function deinitializes the DSPI module and the related RTOS context.

Parameters

  handle | The RTOS DSPI handle.

status_t DSPI_RTOS_Transfer | ( | dspi_rtos_handle_t * | handle,
|  | dspi_transfer_t * | transfer
| ) |  |

This function performs an SPI transfer according to data given in the transfer structure.

Parameters

  handle | The RTOS DSPI handle.
  transfer | Structure specifying the transfer parameters.

Returns
  status of the operation.