From e73d93247e019f74356588c3af1d72ce0e925077 Mon Sep 17 00:00:00 2001 From: Premysl Houdek Date: Thu, 12 Nov 2015 23:11:28 +0100 Subject: bsp/tms570: Pinmux support and EMAC pin definition added Signed-off-by: Premysl Houdek --- .../lib/libbsp/arm/tms570/include/tms570-pinmux.h | 122 +++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 c/src/lib/libbsp/arm/tms570/include/tms570-pinmux.h (limited to 'c/src/lib/libbsp/arm/tms570/include') diff --git a/c/src/lib/libbsp/arm/tms570/include/tms570-pinmux.h b/c/src/lib/libbsp/arm/tms570/include/tms570-pinmux.h new file mode 100644 index 0000000000..46c4ae5eb5 --- /dev/null +++ b/c/src/lib/libbsp/arm/tms570/include/tms570-pinmux.h @@ -0,0 +1,122 @@ +/** + * @file tms570-pinmux.h + * + * @ingroup tms570 + * + * @brief I/O Multiplexing Module (IOMM) basic support + */ + +/* + * Copyright (c) 2015 Premysl Houdek + * + * Google Summer of Code 2014 at + * Czech Technical University in Prague + * Zikova 1903/4 + * 166 36 Praha 6 + * Czech Republic + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifndef LIBBSP_ARM_TMS570_PINMUX_H +#define LIBBSP_ARM_TMS570_PINMUX_H + +#ifndef ASM +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + +#define TMS570_PIN_NUM_SHIFT 0 +#define TMS570_PIN_NUM_MASK 0x0fff + +#define TMS570_PIN_FNC_SHIFT 12 +#define TMS570_PIN_FNC_MASK 0xf000 + +#define TMS570_PIN_FNC_AUTO (-1) + +#define TMS570_PIN_AND_FNC(pin, fnc) \ + ((pin) | ((fnc)<