Driver for the IISC - Inter-IC Sound Controller module.
IISC provides a 5-wire, bidirectional, synchronous, digital audio link with off-chip audio devices: ISDI, ISDO, IWS, ISCK and IMCK pins.
Modules | |
Related Project(s) | |
In this section you can find all the projects related to the IISC - Inter-IC Sound Controller. | |
Data Structures | |
struct | iis_config |
Configuration setting structure. More... | |
struct | iis_dev_inst |
Macros | |
#define | IIS_RETRY_VALUE 10000 |
Typedefs | |
typedef void(* | iis_callback_t )(void) |
typedef enum iis_interrupt_source | iis_interrupt_source_t |
IIS interrupt source. More... | |
Functions | |
void | iis_clear_status (struct iis_dev_inst *const dev_inst, iis_interrupt_source_t source) |
Clear the IIS status value. More... | |
void | iis_disable (struct iis_dev_inst *const dev_inst) |
Disable the IIS module. More... | |
static void | iis_disable_clocks (struct iis_dev_inst *dev_inst) |
Disable the clocks for the IIS module. More... | |
void | iis_disable_interrupt (struct iis_dev_inst *const dev_inst, iis_interrupt_source_t source) |
Disable the specified interrput sources. More... | |
static void | iis_disable_reception (struct iis_dev_inst *dev_inst) |
Disable the IIS module in reception. More... | |
static void | iis_disable_transmission (struct iis_dev_inst *dev_inst) |
Disable the IIS module in transmission. More... | |
void | iis_enable (struct iis_dev_inst *const dev_inst) |
Enable the IIS module. More... | |
static void | iis_enable_clocks (struct iis_dev_inst *dev_inst) |
Enable the clocks for the IIS module. More... | |
void | iis_enable_interrupt (struct iis_dev_inst *const dev_inst, iis_interrupt_source_t source) |
Enable the specified interrput sources. More... | |
static void | iis_enable_reception (struct iis_dev_inst *dev_inst) |
Enable the IIS module in reception. More... | |
static void | iis_enable_transmission (struct iis_dev_inst *dev_inst) |
Enable the IIS module in transmission. More... | |
static void | iis_get_config_defaults (struct iis_config *const cfg) |
Get the default IIS module configuration: Data format: 32 bits Slot length: 32 bits Sample frequecny ratio: 1024 Tx channel: Stereo Rx channel: Stereo DMA for Tx: 1 DMA channel for 1 IIS Tx channel DMA for Rx: 1 DMA channel for 1 IIS Rx channel Loopback: No Master: Yes. More... | |
static uint32_t | iis_get_interrupt_mask (struct iis_dev_inst *const dev_inst) |
Get the IIS interrupts mask value. More... | |
static uint32_t | iis_get_status (struct iis_dev_inst *dev_inst) |
Get the IIS status value. More... | |
enum status_code | iis_init (struct iis_dev_inst *const dev_inst, Iisc *iisc, struct iis_config *const cfg) |
Initialize and configure the IIS module. More... | |
enum status_code | iis_read (struct iis_dev_inst *dev_inst, uint32_t *data) |
Read a single message of data. More... | |
static void | iis_reset (struct iis_dev_inst *dev_inst) |
Resets the IIS module. More... | |
void | iis_set_callback (struct iis_dev_inst *const dev_inst, iis_interrupt_source_t source, iis_callback_t callback, uint8_t irq_level) |
Set callback for IIS. More... | |
enum status_code | iis_write (struct iis_dev_inst *dev_inst, uint32_t data) |
Write a single message of data. More... | |
#define IIS_RETRY_VALUE 10000 |
Referenced by iis_read(), and iis_write().
typedef void(* iis_callback_t)(void) |
typedef enum iis_interrupt_source iis_interrupt_source_t |
IIS interrupt source.
enum iis_data_format |
enum iis_dma_channel |
enum iis_fs_rate |
enum iis_interrupt_source |
enum iis_slot_length |
void iis_clear_status | ( | struct iis_dev_inst * | dev_inst, |
iis_interrupt_source_t | source | ||
) |
Clear the IIS status value.
dev_inst | Device structure pointer. |
source | Interrupt source |
References Assert, iis_dev_inst::hw_dev, IIS_INTERRUPT_RXOR, and IIS_INTERRUPT_TXUR.
void iis_disable | ( | struct iis_dev_inst *const | dev_inst | ) |
Disable the IIS module.
dev_inst | Device structure pointer. |
References SLEEPMGR_ACTIVE, sleepmgr_unlock_mode(), and UNUSED.
Referenced by run_iis_test().
|
inlinestatic |
Disable the clocks for the IIS module.
dev_inst | Device structure pointer. |
References iis_dev_inst::hw_dev.
void iis_disable_interrupt | ( | struct iis_dev_inst *const | dev_inst, |
iis_interrupt_source_t | source | ||
) |
Disable the specified interrput sources.
dev_inst | Device structure pointer. |
source | Interrupt source |
References Assert, iis_dev_inst::hw_dev, IIS_INTERRUPT_RXOR, IIS_INTERRUPT_RXRDY, IIS_INTERRUPT_TXRDY, and IIS_INTERRUPT_TXUR.
|
inlinestatic |
Disable the IIS module in reception.
dev_inst | Device structure pointer. |
References iis_dev_inst::hw_dev.
|
inlinestatic |
Disable the IIS module in transmission.
dev_inst | Device structure pointer. |
References iis_dev_inst::hw_dev.
void iis_enable | ( | struct iis_dev_inst *const | dev_inst | ) |
Enable the IIS module.
dev_inst | Device structure pointer. |
References SLEEPMGR_ACTIVE, sleepmgr_lock_mode(), and UNUSED.
Referenced by run_iis_test().
|
inlinestatic |
Enable the clocks for the IIS module.
dev_inst | Device structure pointer. |
References iis_dev_inst::hw_dev.
Referenced by run_iis_test().
void iis_enable_interrupt | ( | struct iis_dev_inst *const | dev_inst, |
iis_interrupt_source_t | source | ||
) |
Enable the specified interrput sources.
dev_inst | Device structure pointer. |
source | Interrupt source |
References Assert, iis_dev_inst::hw_dev, IIS_INTERRUPT_RXOR, IIS_INTERRUPT_RXRDY, IIS_INTERRUPT_TXRDY, and IIS_INTERRUPT_TXUR.
Referenced by iis_set_callback().
|
inlinestatic |
Enable the IIS module in reception.
dev_inst | Device structure pointer. |
References iis_dev_inst::hw_dev.
Referenced by run_iis_test().
|
inlinestatic |
Enable the IIS module in transmission.
dev_inst | Device structure pointer. |
References iis_dev_inst::hw_dev.
Referenced by run_iis_test().
|
inlinestatic |
Get the default IIS module configuration: Data format: 32 bits Slot length: 32 bits Sample frequecny ratio: 1024 Tx channel: Stereo Rx channel: Stereo DMA for Tx: 1 DMA channel for 1 IIS Tx channel DMA for Rx: 1 DMA channel for 1 IIS Rx channel Loopback: No Master: Yes.
cfg | Pointer to IIS configuration. |
References Assert, iis_config::data_format, iis_config::fs_ratio, IIS_CHANNEL_STEREO, IIS_DATE_32BIT, IIS_FS_RATE_1024, IIS_ONE_DMA_CHANNEL_FOR_ONE_CHANNEL, IIS_SLOT_LENGTH_32BIT, iis_config::loopback, iis_config::master, iis_config::rx_channels, iis_config::rx_dma, iis_config::slot_length, iis_config::tx_channels, and iis_config::tx_dma.
Referenced by run_iis_test().
|
inlinestatic |
Get the IIS interrupts mask value.
dev_inst | Device structure pointer. |
References iis_dev_inst::hw_dev.
Referenced by iis_interrupt_handler().
|
inlinestatic |
Get the IIS status value.
dev_inst | Device structure pointer. |
References iis_dev_inst::hw_dev.
Referenced by iis_interrupt_handler().
enum status_code iis_init | ( | struct iis_dev_inst *const | dev_inst, |
Iisc * | iisc, | ||
struct iis_config *const | cfg | ||
) |
Initialize and configure the IIS module.
dev_inst | Device structure pointer. |
iisc | Base address of the IISC instance. |
cfg | Pointer to IIS configuration. |
References _iis_set_config(), Assert, iis_dev_inst::cfg, dev_inst, iis_dev_inst::hw_dev, iis_reset(), and sysclk_enable_peripheral_clock().
Referenced by run_iis_test().
enum status_code iis_read | ( | struct iis_dev_inst *const | dev_inst, |
uint32_t * | data | ||
) |
Read a single message of data.
dev_inst | Device structure pointer. |
*data | Pointer for receive data |
References Assert, iis_dev_inst::hw_dev, IIS_RETRY_VALUE, STATUS_ERR_TIMEOUT, and STATUS_OK.
|
inlinestatic |
Resets the IIS module.
dev_inst | Device structure pointer. |
References iis_dev_inst::hw_dev.
Referenced by iis_init().
void iis_set_callback | ( | struct iis_dev_inst *const | dev_inst, |
iis_interrupt_source_t | source, | ||
iis_callback_t | callback, | ||
uint8_t | irq_level | ||
) |
Set callback for IIS.
dev_inst | Device structure pointer. |
source | Interrupt source. |
callback | Callback function pointer. |
irq_level | Interrupt level. |
References Assert, callback, iis_callback_pointer, and iis_enable_interrupt().
enum status_code iis_write | ( | struct iis_dev_inst *const | dev_inst, |
uint32_t | data | ||
) |
Write a single message of data.
dev_inst | Device structure pointer. |
data | The data to write |
References Assert, data, iis_dev_inst::hw_dev, IIS_RETRY_VALUE, STATUS_ERR_TIMEOUT, and STATUS_OK.