[processor-sdk/pdk.git] / packages / ti / transport / timeSync / example / src / soc / am437x / timeSyncExampleSoC.h
1 /*
2 * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
3 *
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the
15 * distribution.
16 *
17 * Neither the name of Texas Instruments Incorporated nor the names of
18 * its contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 *
33 */
35 #ifndef TIMESYNC_EXAMPLE_SOC_DEFINES_AM335X_H
36 #define TIMESYNC_EXAMPLE_SOC_DEFINES_AM335X_H
38 #include <ti/drv/i2c/I2C.h>
39 #include <ti/board/board_cfg.h>
40 #include "ti/starterware/include/soc_control.h"
41 #include "ti/starterware/include/chipdb.h"
42 #include <ti/starterware/include/hw/am437x.h>
44 #define TIMESYNC_APP_LINK_INT_NUM 58
45 #define TIMESYNC_APP_RX_INT_NUM 52
46 #define TIMESYNC_APP_TSTX_INT_NUM 56
47 #define TIMESYNC_APP_TIMER_ID 3
48 #define SOC_PWMSS1_IECAP_BASE SOC_PWMSS0_ECAP_REG
49 #define PRUICSS_INSTANCE (2u)
50 #define ICSS_INSTANCE (1u)
52 /* Extern global handles */
53 extern uint8_t lclMac[6];
54 extern TimeSync_ParamsHandle_t timeSyncHandle;
55 extern PRUICSS_Handle pruIcssHandle;
56 extern ICSS_EmacHandle emachandle;
58 /* local functions */
59 /* None */
61 /* Global functions */
62 extern void timeSync_example_configureInterrupts(uint32_t portNum, ICSSEMAC_InitConfig *switchEmacCfg);
63 extern void timeSync_example_socHwInit(void);
64 extern icssVersion_t timeSync_exampleSoCGetIcssVersion(void);
65 extern void timeSync_example_socgetMACAddress(uint32_t portNum, uint8_t *pMacAddr);
66 extern uint8_t timeSync_example_loadFirmware(void);
68 #endif /* TIMESYNC_EXAMPLE_SOC_DEFINES_AM335X_H */