Microchip® Advanced Software Framework

i2sc.c File Reference

I2S driver for SAM.

This file defines a useful set of functions for the I2S on SAM devices.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include "i2sc.h"
#include "sysclk.h"
#include "sleepmgr.h"

Functions

static enum status_code _i2s_set_config (struct i2s_dev_inst *const dev_inst)
 
void i2s_clear_status (struct i2s_dev_inst *dev_inst, i2s_interrupt_source_t source)
 Clear the I2S status value. More...
 
void i2s_disable (struct i2s_dev_inst *const dev_inst)
 Disable the I2S module. More...
 
void i2s_disable_interrupt (struct i2s_dev_inst *const dev_inst, i2s_interrupt_source_t source)
 Disable the specified interrput sources. More...
 
void i2s_enable (struct i2s_dev_inst *const dev_inst)
 Enable the I2S module. More...
 
void i2s_enable_interrupt (struct i2s_dev_inst *const dev_inst, i2s_interrupt_source_t source)
 Enable the specified interrput sources. More...
 
enum status_code i2s_init (struct i2s_dev_inst *const dev_inst, I2sc *i2sc, struct i2s_config *const cfg)
 Initialize and configure the I2S module. More...
 
static void i2s_interrupt_handler (I2sc *i2sc)
 Internal interrupt handler for I2S. More...
 
enum status_code i2s_read (struct i2s_dev_inst *const dev_inst, uint32_t *data)
 Read a single message of data. More...
 
void i2s_set_callback (struct i2s_dev_inst *const dev_inst, i2s_interrupt_source_t source, i2s_callback_t callback, uint8_t irq_level)
 Set callback for I2S. More...
 
enum status_code i2s_write (struct i2s_dev_inst *const dev_inst, uint32_t data)
 Write a single message of data. More...
 

Variables

i2s_callback_t i2s_callback_pointer [I2SC_NUM][_I2S_INTERRUPT_SOURCE_NUM]
 I2S callback function pointer array. More...
 

i2s_callback_t i2s_callback_pointer[I2SC_NUM][_I2S_INTERRUPT_SOURCE_NUM]

I2S callback function pointer array.

Referenced by i2s_interrupt_handler(), and i2s_set_callback().