diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 15a09989d5..626af37ed1 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -2923,5 +2923,8 @@ the Mirtoo module. * configs/mirtoo/scripts: Move all Mirtoo linker scripts to a common directory. + * arch/mips/src/pic32mx/pic32mx-gpio.c: All digital inputs were being + configured as outputs. This is a *critical* bug fix and needs to be + incorporated by any PIC32 users. diff --git a/nuttx/Documentation/NxWidgets.html b/nuttx/Documentation/NxWidgets.html index 165248145b..cef99d4943 100755 --- a/nuttx/Documentation/NxWidgets.html +++ b/nuttx/Documentation/NxWidgets.html @@ -57,7 +57,26 @@
- DOxygen documentation for the NxWidgets-1.0 is now available online at this location. + Release notes, DOxygen documentation, as well as downloads for the latest NxWidgets releases are available online: +
+Thanks go to Jose Pablo Carballo for contributing this! diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-gpio.c b/nuttx/arch/mips/src/pic32mx/pic32mx-gpio.c index a4bef47836..ecff125adf 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-gpio.c +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-gpio.c @@ -160,7 +160,7 @@ int pic32mx_configgpio(uint16_t cfgset) sched_lock(); if (pic32mx_output(cfgset)) { - /* It is an output; set the corresponding bit in the TRIS register */ + /* It is an output; clear the corresponding bit in the TRIS register */ putreg32(1 << pin, base + PIC32MX_IOPORT_TRISCLR_OFFSET); @@ -189,11 +189,9 @@ int pic32mx_configgpio(uint16_t cfgset) } else { - /* It is an input; clear the corresponding bit in the TRIS - * register. - */ + /* It is an input; set the corresponding bit in the TRIS register. */ - putreg32(1 << pin, base + PIC32MX_IOPORT_TRISCLR_OFFSET); + putreg32(1 << pin, base + PIC32MX_IOPORT_TRISSET_OFFSET); putreg32(1 << pin, base + PIC32MX_IOPORT_ODCCLR_OFFSET); } diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-ioport.h b/nuttx/arch/mips/src/pic32mx/pic32mx-ioport.h index 578ce055bb..fb70676fe4 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-ioport.h +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-ioport.h @@ -73,6 +73,7 @@ # define PIC32MX_IOPORT_ODCCLR_OFFSET 0x0044 /* Open drain control clear register */ # define PIC32MX_IOPORT_ODCSET_OFFSET 0x0048 /* Open drain control set register */ # define PIC32MX_IOPORT_ODCINV_OFFSET 0x004c /* Open drain control invert register */ + # define PIC32MX_IOPORT_CNPU_OFFSET 0x0050 /* Change Notification Pull-up register */ # define PIC32MX_IOPORT_CNPUCLR_OFFSET 0x0054 /* Change Notification Pull-up clear register */ # define PIC32MX_IOPORT_CNPUSET_OFFSET 0x0058 /* Change Notification Pull-up set register */