mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +08:00
arch/mips/src/pic32mz/pic32mz-gpio.c: Use LAT instead of PORT when writing.
This commit is contained in:
@@ -290,11 +290,11 @@ void pic32mz_gpiowrite(pinset_t pinset, bool value)
|
|||||||
|
|
||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
putreg32(1 << pin, base + PIC32MZ_IOPORT_PORTSET_OFFSET);
|
putreg32(1 << pin, base + PIC32MZ_IOPORT_LATSET_OFFSET);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
putreg32(1 << pin, base + PIC32MZ_IOPORT_PORTCLR_OFFSET);
|
putreg32(1 << pin, base + PIC32MZ_IOPORT_LATCLR_OFFSET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user