| Kinetis SDK API Reference Manual 1.0.0-beta Freescale Semiconductor, Inc.

- Introduction
- Related Pages
- API Usage

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
fsl_sai_driver.h File Reference
SAI peripheral driver
`#include "fsl_sai_hal.h"`

## Data Structures
struct | sai_user_config_t
| The description structure for the SAI TX/RX module. More...
struct | sai_data_format_t
| Defines the PCM data format. More...
struct | sai_handler_t
| The SAI handler structure. More...

## Macros
#define | USEDMA 1
| Use DMA mode or interrupt mode. More...

## Typedefs
typedef void(* | sai_callback_t )(void *parameter)
| SAI callback function.

## Enumerations
enum | sai_status_t { kStatus_SAI_Success = 0U, kStatus_SAI_Fail = 1U, kStatus_SAI_DeviceBusy = 2U }
| Status structure for SAI.

## Functions
sai_status_t | sai_init (sai_handler_t *handler, sai_user_config_t *config)
| Initializes the SAI module. More...
sai_status_t | sai_deinit (sai_handler_t *handler)
| De-initializes the SAI module. More...
sai_status_t | sai_configure_data_format (sai_handler_t *handler, sai_data_format_t *format)
| Configures the PCM data format. More...
void | sai_start_read_data (sai_handler_t *handler)
| Starts reading data from FIFO. More...
void | sai_start_write_data (sai_handler_t *handler)
| Starts writing data to FIFO. More...
static void | sai_stop_read_data (sai_handler_t *handler)
| Stops reading data from FIFO, mainly to disable the DMA or the interrupt request bit. More...
static void | sai_stop_write_data (sai_handler_t *handler)
| Stop write data to FIFO, mainly to disable the DMA or the interrupt request bit. More...
static void | sai_clear_tx_status (sai_handler_t *handler)
| Clears the TX FIFO error flag. More...
static void | sai_clear_rx_status (sai_handler_t *handler)
| Clears the RX FIFO error flag. More...
static uint32_t * | sai_get_fifo_address (sai_handler_t *handler)
| Gets the FIFO address of the data channel. More...
uint32_t | sai_send_data (sai_handler_t *handler, uint8_t *addr, uint32_t len)
| Sends a certain length data. More...
uint32_t | sai_receive_data (sai_handler_t *handler, uint8_t *addr, uint32_t len)
| Receives a certain length data. More...
void | sai_register_callback (sai_handler_t *handler, sai_callback_t callback, void *callback_param)
| Registers the callback function after a transfer. More...