/**
 * Note: This file was auto-generated by TI PinMux on 1/18/2020 at 4:53:46 AM.
 *
 * \file  boardPadDelayInit.c
 *
 * \brief   This file contain manual/vritual iodelay mode definitions
 *
 * \copyright Copyright (CU) 2015-2018 Texas Instruments Incorporated - 
 *             http://www.ti.com/
 */

/**
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions
 *  are met:
 *
 *    Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 *    Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the
 *    distribution.
 *
 *    Neither the name of Texas Instruments Incorporated nor the names of
 *    its contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */

#include <stdint.h>
#include "boardPadDelay.h"
#include "boardPadDelayTune.h"


#if defined(_TMS320C6X) || defined(__TI_ARM_V7M4__)
#ifndef __cplusplus
#pragma DATA_SECTION (pad, "BOARD_IO_DELAY_DATA");
#else
#pragma DATA_SECTION ("BOARD_IO_DELAY_DATA");
#endif
const boardPadDelayCfg_t pad[] = {
#else
const boardPadDelayCfg_t pad[] __attribute__((section("BOARD_IO_DELAY_DATA"))) = {
#endif
/** {PADCONF_REG_OFFSET, PADCONF_VALUE, {CFG_X_IN offset, aDelay, gDelay}, {CFG_X_OEN offset, aDelay, gDelay}, {CFG_X_OUT offset, aDelay, gDelay}} **/

/* MCASP1 - mcasp1_ahclkx on D18 - MyMCASP1 */
     {0x1694, 0x50003, {0x0, 0, 0}, {0x0, 0, 0}, {0x0, 0, 0}},

/* MCASP1 - mcasp1_aclkx on C14 - MyMCASP1 */
#ifdef MCASP1_DEFAULT
     {0x16A4, 0x50000, {0x0, 0, 0}, {0x0, 0, 0}, {0x0, 0, 0}},
#endif

/* MCASP1 - mcasp1_fsx on D14 - MyMCASP1 */
#ifdef MCASP1_DEFAULT
     {0x16A8, 0xD0000, {0x0, 0, 0}, {0x0, 0, 0}, {0x0, 0, 0}},
#endif

/* MCASP1 - mcasp1_aclkr on B14 - MyMCASP1 */
#ifdef MCASP1_DEFAULT
     {0x16AC, 0x50000, {0x0, 0, 0}, {0x0, 0, 0}, {0x0, 0, 0}},
#endif

/* MCASP1 - mcasp1_fsr on J14 - MyMCASP1 */
#ifdef MCASP1_DEFAULT
     {0x16B0, 0x50000, {0x0, 0, 0}, {0x0, 0, 0}, {0x0, 0, 0}},
#endif

/* MCASP1 - mcasp1_axr0 on G12 - MyMCASP1 */
#ifdef MCASP1_DEFAULT
     {0x16B4, 0xD0000, {0x0, 0, 0}, {0x0, 0, 0}, {0x0, 0, 0}},
#endif
};

#ifdef __cplusplus
#if defined(_TMS320C6X) || defined(__TI_ARM_V7M4__)
#pragma CODE_SECTION ("BOARD_IO_DELAY_CODE");
#endif
#endif
uint32_t boardPadGetSize()
{
     return (sizeof(pad) / sizeof(boardPadDelayCfg_t));
}

#ifdef BOARD_PAD_DELAY_ALT_GRP_ENABLE
#ifdef __cplusplus
#if defined(_TMS320C6X) || defined(__TI_ARM_V7M4__)
#pragma CODE_SECTION ("BOARD_IO_DELAY_CODE");
#endif
#endif
uint32_t boardAltPadGetSize()
{
     return (sizeof(altPad) / sizeof(boardPadDelayAltGpCfg_t));
}
#endif
