--- /dev/null
+/*\r
+* Configuration of module: Port (Port_Cfg.h)\r
+*\r
+* Created by: \r
+* Copyright: \r
+*\r
+* Configured for (MCU): TMS570\r
+*\r
+* Module vendor: ArcCore\r
+* Generator version: 2.0.2\r
+*\r
+* Generated by Arctic Studio (http://arccore.com) \r
+*/\r
+\r
+\r
+#if !(((PORT_SW_MAJOR_VERSION == 1) && (PORT_SW_MINOR_VERSION == 0)) )\r
+#error Port: Configuration file expected BSW module version to be 1.0.*\r
+#endif\r
+\r
+\r
+#ifndef PORT_CFG_H_\r
+#define PORT_CFG_H_\r
+\r
+#include "Std_Types.h"\r
+\r
+// TODO - check if should change to STD_ON\r
+/** Build version info API */\r
+#define PORT_VERSION_INFO_API STD_ON\r
+/** Enable Development Error Trace */\r
+#define PORT_DEV_ERROR_DETECT STD_OFF\r
+/** Build change pin direction API */\r
+#define PORT_SET_PIN_DIRECTION_API STD_ON\r
+/** Allow Pin mode changes during runtime */\r
+#define PORT_SET_PIN_MODE_API STD_ON\r
+\r
+#define PORT_NUMBER_OF_PINS 3\r
+\r
+#define PORT_FUNC_NO (0 << 1)\r
+#define PORT_FUNC (1 << 1)\r
+#define PORT_PULL_NONE (1 << 2)\r
+#define PORT_PULL_UP (1 << 3)\r
+#define PORT_PULL_DOWN (0 << 3)\r
+#define PORT_ODE_ENABLE (1 << 4)\r
+#define PORT_DIRECTION_CHANGEABLE (1 << 5)\r
+\r
+/** pins on the base PINMUX0 */\r
+/* TODO: add all remaining bases */\r
+\r
+/* see TMS570LS31x Tech. Ref. Manual - 4.6. Signal Multiplexing and Control (pg. 240 - 243) */\r
+// TODO: change\r
+typedef enum\r
+{\r
+ PINMUX_BALL_W10_SHIFT = 0, // GIOB[3] - default function\r
+ PINMUX_BALL_A5_SHIFT = 8, // GIOA[0] - default function\r
+ PINMUX_BALL_C3_SHIFT = 16, // MIBSPI3NCS[3] - default function\r
+ PINMUX_BALL_B2_SHIFT = 24, // MIBSPI3NCS[2] - deafult function\r
+} PinMux_Ball;\r
+\r
+typedef enum\r
+{\r
+ PINMUX_BALL_DEFAULT = 0x1,\r
+ PINMUX_BALL_ALTERNATE1 = 0x2,\r
+ PINMUX_BALL_ALTERNATE2 = 0x4,\r
+ PINMUX_BALL_ALTERNATE3 = 0x8,\r
+ PINMUX_BALL_ALTERNATE4 = 0x10\r
+} PinMux_FunctionNumber;\r
+\r
+\r
+/** HW specific symbolic names of pins */\r
+/** @req PORT013, PORT076 */\r
+/** @req PORT219: Port_PinType shall be uint8, uint16 or uint32 */\r
+typedef enum\r
+{ // TODO: check if correct\r
+ PORT_PIN_DCAN1_TX = 0x0800,\r
+ PORT_PIN_DCAN1_RX = 0x0801,\r
+ PORT_PIN_LED1 = 0x021b,\r
+} Port_PinType;\r
+\r
+/** Port pad mappings */\r
+#define PORT_PAD_106 0x0800 // PORT_PIN_DCAN1_TX\r
+#define PORT_PAD_107 0x0801 // PORT_PIN_DCAN1_RX\r
+#define PORT_PAD_3 0x0003 // PORT_PIN_LED1\r
+\r
+typedef struct {\r
+ Port_PinType pin;\r
+ uint8 conf;\r
+ PinMux_Ball pinmux;\r
+ PinMux_FunctionNumber pinmuxFunctionNum;\r
+ uint16 pinmuxBaseNum;\r
+\r
+} Port_ConfiguredPinType;\r
+\r
+/** Top level configuration container */\r
+/** @req PORT073 */\r
+typedef struct\r
+{\r
+ const Port_ConfiguredPinType pins[PORT_NUMBER_OF_PINS];\r
+} Port_ConfigType;\r
+\r
+/** Instance of the top level configuration container */\r
+extern const Port_ConfigType PortConfigData;\r
+\r
+\r
+#endif /*PORT_CFG_H_*/\r