mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
arch/arm/src/imxrt/chip: Add pin multiplexing header files.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -230,7 +230,6 @@
|
|||||||
#define IMXRT_PADMUX_OFFSET(n) (0x0014 + ((unsigned int)(n) << 2))
|
#define IMXRT_PADMUX_OFFSET(n) (0x0014 + ((unsigned int)(n) << 2))
|
||||||
#define IMXRT_PADMUX_OFFSET_SNVS(n) ((unsigned int)(n) << 2)
|
#define IMXRT_PADMUX_OFFSET_SNVS(n) ((unsigned int)(n) << 2)
|
||||||
|
|
||||||
|
|
||||||
#define IMXRT_PADMUX_GPIO_EMC_00_OFFSET 0x0014
|
#define IMXRT_PADMUX_GPIO_EMC_00_OFFSET 0x0014
|
||||||
#define IMXRT_PADMUX_GPIO_EMC_01_OFFSET 0x0018
|
#define IMXRT_PADMUX_GPIO_EMC_01_OFFSET 0x0018
|
||||||
#define IMXRT_PADMUX_GPIO_EMC_02_OFFSET 0x001c
|
#define IMXRT_PADMUX_GPIO_EMC_02_OFFSET 0x001c
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
/************************************************************************************
|
||||||
|
* arch/arm/src/imxrt/chip/imxrt_pinmux.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||||
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. 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.
|
||||||
|
* 3. Neither the name NuttX 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.
|
||||||
|
*
|
||||||
|
************************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __ARCH_ARM_SRC_IMXRT_CHIP_IMXRT_PINMUX_H
|
||||||
|
#define __ARCH_ARM_SRC_IMXRT_CHIP_IMXRT_PINMUX_H
|
||||||
|
|
||||||
|
/************************************************************************************
|
||||||
|
* Included Files
|
||||||
|
************************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#if defined(CONFIG_ARCH_FAMILY_IMXRT105x)
|
||||||
|
# include "chip/imxrt105x_pinmux.h"
|
||||||
|
#else
|
||||||
|
# error Unrecognized i.MX RT architecture
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __ARCH_ARM_SRC_IMXRT_CHIP_IMXRT_PINMUX_H */
|
||||||
@@ -369,17 +369,13 @@ static ssize_t rgbled_write(FAR struct file *filep, FAR const char *buffer,
|
|||||||
/* Convert 8bit to 16bits */
|
/* Convert 8bit to 16bits */
|
||||||
|
|
||||||
#ifdef CONFIG_RGBLED_LIGHTNESS_CORRECTION
|
#ifdef CONFIG_RGBLED_LIGHTNESS_CORRECTION
|
||||||
|
|
||||||
red = rgbled_lightness((unsigned char)red);
|
red = rgbled_lightness((unsigned char)red);
|
||||||
green = rgbled_lightness((unsigned char)green);
|
green = rgbled_lightness((unsigned char)green);
|
||||||
blue = rgbled_lightness((unsigned char)blue);
|
blue = rgbled_lightness((unsigned char)blue);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
red = (red << 8) | red;
|
red = (red << 8) | red;
|
||||||
green = (green << 8) | green;
|
green = (green << 8) | green;
|
||||||
blue = (blue << 8) | blue;
|
blue = (blue << 8) | blue;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RGBLED_INVERT
|
#ifdef CONFIG_RGBLED_INVERT
|
||||||
@@ -389,7 +385,6 @@ static ssize_t rgbled_write(FAR struct file *filep, FAR const char *buffer,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_PWM_MULTICHAN
|
#ifdef CONFIG_PWM_MULTICHAN
|
||||||
|
|
||||||
memset(&pwm, 0, sizeof(struct pwm_info_s));
|
memset(&pwm, 0, sizeof(struct pwm_info_s));
|
||||||
pwm.frequency = 100;
|
pwm.frequency = 100;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user