mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
arch/arm/src/imxrt: Corrects some IOMUX controls.
This commit is contained in:
@@ -140,15 +140,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define GPIO_ALT_SHIFT (27) /* Bits 27-29: Peripheral alternate function */
|
#define GPIO_ALT_SHIFT (27) /* Bits 27-29: Peripheral alternate function */
|
||||||
#define GPIO_ALT_MASK (15 << GPIO_ALT_SHIFT)
|
#define GPIO_ALT_MASK (7 << GPIO_ALT_SHIFT)
|
||||||
# define GPIO_ALT0 (0 << GPIO_ALT_SHIFT) /* Alternate function 1 */
|
# define GPIO_ALT0 (0 << GPIO_ALT_SHIFT) /* Alternate function 0 */
|
||||||
# define GPIO_ALT1 (1 << GPIO_ALT_SHIFT) /* Alternate function 2 */
|
# define GPIO_ALT1 (1 << GPIO_ALT_SHIFT) /* Alternate function 1 */
|
||||||
# define GPIO_ALT2 (2 << GPIO_ALT_SHIFT) /* Alternate function 3 */
|
# define GPIO_ALT2 (2 << GPIO_ALT_SHIFT) /* Alternate function 2 */
|
||||||
# define GPIO_ALT3 (3 << GPIO_ALT_SHIFT) /* Alternate function 4 */
|
# define GPIO_ALT3 (3 << GPIO_ALT_SHIFT) /* Alternate function 3 */
|
||||||
# define GPIO_ALT4 (4 << GPIO_ALT_SHIFT) /* Alternate function 5 */
|
# define GPIO_ALT4 (4 << GPIO_ALT_SHIFT) /* Alternate function 4 */
|
||||||
/* Alternate function 5 is GPIO */
|
/* Alternate function 5 is GPIO */
|
||||||
# define GPIO_ALT6 (6 << GPIO_ALT_SHIFT) /* Alternate function 1 */
|
# define GPIO_ALT6 (6 << GPIO_ALT_SHIFT) /* Alternate function 6 */
|
||||||
# define GPIO_ALT7 (7 << GPIO_ALT_SHIFT) /* Alternate function 1 */
|
# define GPIO_ALT7 (7 << GPIO_ALT_SHIFT) /* Alternate function 7 */
|
||||||
|
|
||||||
/* Interrupt edge/level configuration
|
/* Interrupt edge/level configuration
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -241,9 +241,10 @@ int imxrt_iomux_configure(uintptr_t padctl, iomux_pinset_t ioset)
|
|||||||
|
|
||||||
/* Select CMOS input or Schmitt Trigger input */
|
/* Select CMOS input or Schmitt Trigger input */
|
||||||
|
|
||||||
|
regval = 0;
|
||||||
if ((ioset & IOMUX_SCHMITT_TRIGGER) != 0)
|
if ((ioset & IOMUX_SCHMITT_TRIGGER) != 0)
|
||||||
{
|
{
|
||||||
regval |= PADCTL_SRE;
|
regval |= PADCTL_HYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Select drive strength */
|
/* Select drive strength */
|
||||||
@@ -291,7 +292,7 @@ int imxrt_iomux_configure(uintptr_t padctl, iomux_pinset_t ioset)
|
|||||||
|
|
||||||
if ((ioset & IOMUX_SLEW_FAST) != 0)
|
if ((ioset & IOMUX_SLEW_FAST) != 0)
|
||||||
{
|
{
|
||||||
regval |= PADCTL_HYS;
|
regval |= PADCTL_SRE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write the result to the specified Pad Control register */
|
/* Write the result to the specified Pad Control register */
|
||||||
|
|||||||
@@ -119,7 +119,7 @@
|
|||||||
* .... .... .... .SS.
|
* .... .... .... .SS.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define IOMUX_SPEED_SHIFT (2) /* Bits 2-3: Speed */
|
#define IOMUX_SPEED_SHIFT (1) /* Bits 1-2: Speed */
|
||||||
#define IOMUX_SPEED_MASK (3 << IOMUX_SPEED_SHIFT)
|
#define IOMUX_SPEED_MASK (3 << IOMUX_SPEED_SHIFT)
|
||||||
# define IOMUX_SPEED_LOW (SPEED_LOW << IOMUX_SPEED_SHIFT) /* Low frequency (50 MHz) */
|
# define IOMUX_SPEED_LOW (SPEED_LOW << IOMUX_SPEED_SHIFT) /* Low frequency (50 MHz) */
|
||||||
# define IOMUX_SPEED_MEDIUM (SPEED_MEDIUM << IOMUX_SPEED_SHIFT) /* Medium frequency (100, 150 MHz) */
|
# define IOMUX_SPEED_MEDIUM (SPEED_MEDIUM << IOMUX_SPEED_SHIFT) /* Medium frequency (100, 150 MHz) */
|
||||||
|
|||||||
Reference in New Issue
Block a user