arch/arm/src/imxrt/chip: Add pin multiplexing header files.
This commit is contained in:
parent
2de86b3e40
commit
3a34b29f76
1049
arch/arm/src/imxrt/chip/imxrt105x_pinmux.h
Normal file
1049
arch/arm/src/imxrt/chip/imxrt105x_pinmux.h
Normal file
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_SNVS(n) ((unsigned int)(n) << 2)
|
||||
|
||||
|
||||
#define IMXRT_PADMUX_GPIO_EMC_00_OFFSET 0x0014
|
||||
#define IMXRT_PADMUX_GPIO_EMC_01_OFFSET 0x0018
|
||||
#define IMXRT_PADMUX_GPIO_EMC_02_OFFSET 0x001c
|
||||
|
51
arch/arm/src/imxrt/chip/imxrt_pinmux.h
Normal file
51
arch/arm/src/imxrt/chip/imxrt_pinmux.h
Normal file
@ -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 */
|
||||
|
||||
#ifdef CONFIG_RGBLED_LIGHTNESS_CORRECTION
|
||||
|
||||
red = rgbled_lightness((unsigned char)red);
|
||||
green = rgbled_lightness((unsigned char)green);
|
||||
blue = rgbled_lightness((unsigned char)blue);
|
||||
|
||||
#else
|
||||
|
||||
red = (red << 8) | red;
|
||||
green = (green << 8) | green;
|
||||
blue = (blue << 8) | blue;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RGBLED_INVERT
|
||||
@ -389,7 +385,6 @@ static ssize_t rgbled_write(FAR struct file *filep, FAR const char *buffer,
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PWM_MULTICHAN
|
||||
|
||||
memset(&pwm, 0, sizeof(struct pwm_info_s));
|
||||
pwm.frequency = 100;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user