SmartSnippets DA1459x SDK
Data Structures | Macros | Enumerations | Functions

Definition of the API for the Audio Unit SRC Low Level Driver. More...

#include <stdbool.h>
#include <stdint.h>
#include "sdk_defs.h"

Go to the source code of this file.

Data Structures

struct  hw_src_config_t
 SRC configuration structure definition. More...
 

Macros

#define HW_SRC1   ((void *)SRC1_BASE)
 SRC id. More...
 
#define HW_SRC_REG_GETF(id, base, reg, field)   ((SRCBA(id)->SRC1_##reg & (base##_SRC1_##reg##_##field##_Msk)) >> (base##_SRC1_##reg##_##field##_Pos))
 Get the value of a field of a SRC register. More...
 
#define HW_SRC_REG_SETF(id, base, reg, field, val)
 Set the value of a field of a SRC register. More...
 
#define HW_SRC_REG_SET_FIELD(base, reg, field, var, val)
 Set SRC register field value. More...
 
#define HW_SRC_REG_GET_FIELD(base, reg, field, var)
 Access register field value. More...
 
#define HW_SRC_REG_CLR_FIELD(base, reg, field, var)   var &= ~(base##_SRC1_##reg##_##field##_Msk)
 Clear register field value. More...
 
#define HW_SRC_REG_SET_BIT(id, base, reg, field)
 Set a bit of a SRC register. More...
 
#define HW_SRC_REG_CLR_BIT(id, base, reg, field)
 Clear a bit of a SRC register. More...
 

Enumerations

enum  HW_SRC_DIRECTION { HW_SRC_IN, HW_SRC_OUT }
 Input/Output direction. More...
 
enum  HW_SRC_FLOW_STATUS { HW_SRC_FLOW_OK = 0, HW_SRC_FLOW_OVER, HW_SRC_FLOW_UNDER, HW_SRC_FLOW_OVER_UNDER }
 Flow status. More...
 
enum  HW_SRC_SELECTION { HW_SRC_PCM = 1, HW_SRC_PDM, HW_SRC_REGS }
 Input/Output selection. More...
 
enum  HW_SRCx_MUX_IN { HW_SRC_INPUT_MUX_OFF, HW_SRC_INPUT_MUX_PCM_OUT_REG, HW_SRC_INPUT_MUX_SRCx_IN_REG, HW_SRC_INPUT_MUX_SDADC_OUT }
 SRCx input multiplexer. More...
 
enum  HW_PDM1_MUX_IN { HW_PDM_INPUT_MUX_SRCx_MUX_IN, HW_PDM_INPUT_MUX_PDM_INPUT }
 PDM input multiplexer. More...
 

Functions

__STATIC_INLINE void hw_src_enable (HW_SRC_ID id)
 Enable SRC. More...
 
__STATIC_INLINE void hw_src_disable (HW_SRC_ID id)
 Disable SRC. More...
 
__STATIC_INLINE bool hw_src_is_enabled (HW_SRC_ID id)
 Check if SRC is enabled. More...
 
__STATIC_INLINE void hw_src_enable_fifo (HW_SRC_ID id, HW_SRC_DIRECTION direction)
 Enable SRC FIFO. FIFO is used to store samples from/to SRC. More...
 
__STATIC_INLINE void hw_src_disable_fifo (HW_SRC_ID id)
 Disable SRC FIFO. On each SRC request, one sample is serviced. More...
 
__STATIC_INLINE bool hw_src_is_fifo_enabled (HW_SRC_ID id)
 Check if SRC FIFO is enabled. FIFO is used to store samples from/to SRC. More...
 
__STATIC_INLINE void hw_src_set_automode (HW_SRC_ID id, HW_SRC_DIRECTION direction)
 Set Automatic Conversion mode. More...
 
__STATIC_INLINE void hw_src_set_manual_mode (HW_SRC_ID id, HW_SRC_DIRECTION direction)
 Clear Automatic Conversion mode. Use manual mode. More...
 
__STATIC_INLINE void hw_src_select_input (HW_SRC_SELECTION input, hw_src_config_t *config)
 Select the SRC input. More...
 
__STATIC_INLINE void hw_src_write_input (HW_SRC_ID id, uint8_t stream, uint32_t value)
 Write data to an input SRC register. More...
 
__STATIC_INLINE bool hw_src_is_auto_mode (HW_SRC_ID id, HW_SRC_DIRECTION direction)
 Get the mode. More...
 
__STATIC_INLINE uint32_t hw_src_read_output (HW_SRC_ID id, uint8_t stream)
 Read data from an output SRC register. More...
 
HW_SRC_FLOW_STATUS hw_src_get_flow_status (HW_SRC_ID id, HW_SRC_DIRECTION direction)
 Check if SRC flow errors have occurred and clear the indication. More...
 
void hw_src_init (HW_SRC_ID id, hw_src_config_t *config)
 Initialize the SRC. More...
 

Detailed Description

Definition of the API for the Audio Unit SRC Low Level Driver.

Copyright (C) 2020-2023 Renesas Electronics Corporation and/or its affiliates. All rights reserved. Confidential Information.

This software ("Software") is supplied by Renesas Electronics Corporation and/or its affiliates ("Renesas"). Renesas grants you a personal, non-exclusive, non-transferable, revocable, non-sub-licensable right and license to use the Software, solely if used in or together with Renesas products. You may make copies of this Software, provided this copyright notice and disclaimer ("Notice") is included in all such copies. Renesas reserves the right to change or discontinue the Software at any time without notice.

THE SOFTWARE IS PROVIDED "AS IS". RENESAS DISCLAIMS ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. TO THE MAXIMUM EXTENT PERMITTED UNDER LAW, IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE, EVEN IF RENESAS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. USE OF THIS SOFTWARE MAY BE SUBJECT TO TERMS AND CONDITIONS CONTAINED IN AN ADDITIONAL AGREEMENT BETWEEN YOU AND RENESAS. IN CASE OF CONFLICT BETWEEN THE TERMS OF THIS NOTICE AND ANY SUCH ADDITIONAL LICENSE AGREEMENT, THE TERMS OF THE AGREEMENT SHALL TAKE PRECEDENCE. BY CONTINUING TO USE THIS SOFTWARE, YOU AGREE TO THE TERMS OF THIS NOTICE.IF YOU DO NOT AGREE TO THESE TERMS, YOU ARE NOT PERMITTED TO USE THIS SOFTWARE.