/** * @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)<> TMS570_PIN_NUM_SHIFT; *pinmmrx = &TMS570_IOMM.PINMUX.PINMMR0 + (pin_num >> 2); *pin_shift = (pin_num & 0x3)*8; } #endif /** @} */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* LIBBSP_ARM_TMS570_IRQ_H */