summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-01-24 14:28:49 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-01-24 14:28:49 -0600
commitce7d02b55783779750eb4da036ad2185e7f7cf44 (patch)
tree8d1eebba9a1bb5c7942bcf89c617fff85df96045
parentcafcbeb3a0d16b13048d14fa8ef75cce2a87f738 (diff)
downloadnuttx-ce7d02b55783779750eb4da036ad2185e7f7cf44.tar.gz
nuttx-ce7d02b55783779750eb4da036ad2185e7f7cf44.tar.bz2
nuttx-ce7d02b55783779750eb4da036ad2185e7f7cf44.zip
rename up_led*() functions to board_led_*()
-rw-r--r--nuttx/ChangeLog3
-rw-r--r--nuttx/Documentation/NuttxPortingGuide.html18
-rw-r--r--nuttx/arch/8051/src/up_allocateheap.c2
-rw-r--r--nuttx/arch/8051/src/up_assert.c6
-rw-r--r--nuttx/arch/8051/src/up_head.S6
-rw-r--r--nuttx/arch/8051/src/up_idle.c4
-rw-r--r--nuttx/arch/8051/src/up_initialize.c2
-rw-r--r--nuttx/arch/8051/src/up_internal.h12
-rw-r--r--nuttx/arch/8051/src/up_irqtest.c8
-rw-r--r--nuttx/arch/arm/src/arm/up_assert.c6
-rw-r--r--nuttx/arch/arm/src/arm/up_doirq.c4
-rw-r--r--nuttx/arch/arm/src/arm/up_nommuhead.S2
-rw-r--r--nuttx/arch/arm/src/arm/up_sigdeliver.c4
-rw-r--r--nuttx/arch/arm/src/armv6-m/up_assert.c6
-rw-r--r--nuttx/arch/arm/src/armv6-m/up_doirq.c4
-rw-r--r--nuttx/arch/arm/src/armv6-m/up_sigdeliver.c4
-rw-r--r--nuttx/arch/arm/src/armv7-a/arm_assert.c6
-rw-r--r--nuttx/arch/arm/src/armv7-a/arm_doirq.c4
-rw-r--r--nuttx/arch/arm/src/armv7-a/arm_sigdeliver.c4
-rw-r--r--nuttx/arch/arm/src/armv7-m/up_assert.c6
-rw-r--r--nuttx/arch/arm/src/armv7-m/up_doirq.c4
-rw-r--r--nuttx/arch/arm/src/armv7-m/up_sigdeliver.c4
-rw-r--r--nuttx/arch/arm/src/common/up_allocateheap.c4
-rw-r--r--nuttx/arch/arm/src/common/up_createstack.c2
-rw-r--r--nuttx/arch/arm/src/common/up_initialize.c2
-rw-r--r--nuttx/arch/arm/src/common/up_internal.h12
-rw-r--r--nuttx/arch/arm/src/dm320/dm320_allocateheap.c2
-rw-r--r--nuttx/arch/arm/src/dm320/dm320_boot.c2
-rw-r--r--nuttx/arch/arm/src/efm32/efm32_idle.c4
-rw-r--r--nuttx/arch/arm/src/imx/imx_allocateheap.c2
-rw-r--r--nuttx/arch/arm/src/imx/imx_boot.c2
-rw-r--r--nuttx/arch/arm/src/kinetis/kinetis_allocateheap.c4
-rw-r--r--nuttx/arch/arm/src/kinetis/kinetis_idle.c4
-rw-r--r--nuttx/arch/arm/src/kl/kl_idle.c4
-rw-r--r--nuttx/arch/arm/src/lm/lm_allocateheap.c4
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_allocateheap.c4
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_idle.c4
-rw-r--r--nuttx/arch/arm/src/lpc214x/lpc214x_head.S2
-rwxr-xr-xnuttx/arch/arm/src/lpc2378/lpc23xx_head.S2
-rw-r--r--nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c2
-rw-r--r--nuttx/arch/arm/src/lpc43xx/lpc43_allocateheap.c2
-rw-r--r--nuttx/arch/arm/src/lpc43xx/lpc43_idle.c4
-rw-r--r--nuttx/arch/arm/src/nuc1xx/nuc_idle.c4
-rw-r--r--nuttx/arch/arm/src/sam34/sam_allocateheap.c4
-rw-r--r--nuttx/arch/arm/src/sama5/sam_allocateheap.c4
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_allocateheap.c4
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_idle.c4
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_decodeirq.c6
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_head.S4
-rw-r--r--nuttx/arch/avr/src/avr/up_createstack.c2
-rw-r--r--nuttx/arch/avr/src/avr/up_doirq.c4
-rw-r--r--nuttx/arch/avr/src/avr/up_sigdeliver.c4
-rw-r--r--nuttx/arch/avr/src/avr32/up_createstack.c2
-rw-r--r--nuttx/arch/avr/src/avr32/up_doirq.c4
-rw-r--r--nuttx/arch/avr/src/avr32/up_sigdeliver.c4
-rw-r--r--nuttx/arch/avr/src/common/up_allocateheap.c2
-rw-r--r--nuttx/arch/avr/src/common/up_assert.c6
-rw-r--r--nuttx/arch/avr/src/common/up_initialize.c2
-rw-r--r--nuttx/arch/avr/src/common/up_internal.h8
-rw-r--r--nuttx/arch/hc/src/common/up_allocateheap.c2
-rw-r--r--nuttx/arch/hc/src/common/up_createstack.c2
-rw-r--r--nuttx/arch/hc/src/common/up_doirq.c4
-rw-r--r--nuttx/arch/hc/src/common/up_initialize.c2
-rw-r--r--nuttx/arch/hc/src/common/up_internal.h12
-rw-r--r--nuttx/arch/hc/src/m9s12/m9s12_assert.c6
-rw-r--r--nuttx/arch/mips/include/pic32mx/cp0.h792
-rw-r--r--nuttx/arch/mips/src/common/up_allocateheap.c2
-rw-r--r--nuttx/arch/mips/src/common/up_createstack.c2
-rw-r--r--nuttx/arch/mips/src/common/up_initialize.c2
-rw-r--r--nuttx/arch/mips/src/common/up_internal.h10
-rw-r--r--nuttx/arch/mips/src/mips32/up_assert.c6
-rw-r--r--nuttx/arch/mips/src/mips32/up_doirq.c4
-rw-r--r--nuttx/arch/mips/src/mips32/up_sigdeliver.c4
-rw-r--r--nuttx/arch/mips/src/pic32mx/pic32mx-cvr.h226
-rw-r--r--nuttx/arch/mips/src/pic32mx/pic32mx-decodeirq.c6
-rw-r--r--nuttx/arch/mips/src/pic32mx/pic32mx-exception.c2
-rw-r--r--nuttx/arch/mips/src/pic32mx/pic32mx-ic.h332
-rw-r--r--nuttx/arch/mips/src/pic32mx/pic32mx-oc.h422
-rw-r--r--nuttx/arch/mips/src/pic32mx/pic32mx-timer.h444
-rw-r--r--nuttx/arch/sh/src/common/up_allocateheap.c2
-rw-r--r--nuttx/arch/sh/src/common/up_assert.c6
-rw-r--r--nuttx/arch/sh/src/common/up_createstack.c2
-rw-r--r--nuttx/arch/sh/src/common/up_doirq.c4
-rw-r--r--nuttx/arch/sh/src/common/up_initialize.c2
-rw-r--r--nuttx/arch/sh/src/common/up_internal.h12
-rw-r--r--nuttx/arch/sh/src/m16c/m16c_head.S4
-rw-r--r--nuttx/arch/sh/src/m16c/m16c_sigdeliver.c4
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_head.S6
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_sigdeliver.c4
-rw-r--r--nuttx/arch/x86/src/common/up_allocateheap.c2
-rw-r--r--nuttx/arch/x86/src/common/up_assert.c6
-rw-r--r--nuttx/arch/x86/src/common/up_initialize.c2
-rw-r--r--nuttx/arch/x86/src/common/up_internal.h12
-rw-r--r--nuttx/arch/x86/src/i486/up_createstack.c2
-rw-r--r--nuttx/arch/x86/src/i486/up_sigdeliver.c4
-rw-r--r--nuttx/arch/x86/src/qemu/qemu_handlers.c14
-rw-r--r--nuttx/arch/z16/src/common/up_allocateheap.c2
-rw-r--r--nuttx/arch/z16/src/common/up_assert.c6
-rw-r--r--nuttx/arch/z16/src/common/up_createstack.c2
-rw-r--r--nuttx/arch/z16/src/common/up_doirq.c4
-rw-r--r--nuttx/arch/z16/src/common/up_idle.c4
-rw-r--r--nuttx/arch/z16/src/common/up_initialize.c2
-rw-r--r--nuttx/arch/z16/src/common/up_internal.h12
-rw-r--r--nuttx/arch/z16/src/common/up_sigdeliver.c4
-rwxr-xr-xnuttx/arch/z16/src/z16f/z16f_head.S4
-rw-r--r--nuttx/arch/z80/src/common/up_allocateheap.c2
-rw-r--r--nuttx/arch/z80/src/common/up_assert.c6
-rw-r--r--nuttx/arch/z80/src/common/up_createstack.c2
-rw-r--r--nuttx/arch/z80/src/common/up_doirq.c4
-rw-r--r--nuttx/arch/z80/src/common/up_idle.c4
-rw-r--r--nuttx/arch/z80/src/common/up_initialize.c2
-rw-r--r--nuttx/arch/z80/src/common/up_internal.h12
-rw-r--r--nuttx/arch/z80/src/ez80/ez80_sigdeliver.c4
-rw-r--r--nuttx/arch/z80/src/z180/z180_sigdeliver.c4
-rwxr-xr-xnuttx/arch/z80/src/z8/z8_head.S2
-rw-r--r--nuttx/arch/z80/src/z8/z8_sigdeliver.c4
-rw-r--r--nuttx/arch/z80/src/z80/z80_sigdeliver.c4
-rw-r--r--nuttx/configs/16z/src/z16f_leds.c12
-rw-r--r--nuttx/configs/arduino-due/src/arduino-due.h4
-rw-r--r--nuttx/configs/arduino-due/src/sam_autoleds.c12
-rw-r--r--nuttx/configs/arduino-due/src/sam_boot.c2
-rw-r--r--nuttx/configs/avr32dev1/src/avr32dev1_internal.h4
-rw-r--r--nuttx/configs/avr32dev1/src/up_boot.c2
-rw-r--r--nuttx/configs/avr32dev1/src/up_leds.c12
-rw-r--r--nuttx/configs/c5471evm/src/up_leds.c12
-rw-r--r--nuttx/configs/cloudctrl/src/up_autoleds.c14
-rw-r--r--nuttx/configs/cloudctrl/src/up_boot.c2
-rw-r--r--nuttx/configs/demo9s12ne64/src/demo9s12ne64.h4
-rw-r--r--nuttx/configs/demo9s12ne64/src/up_boot.c2
-rw-r--r--nuttx/configs/demo9s12ne64/src/up_leds.c12
-rw-r--r--nuttx/configs/ea3131/src/up_boot.c2
-rw-r--r--nuttx/configs/ea3131/src/up_clkinit.c2
-rw-r--r--nuttx/configs/ea3131/src/up_leds.c12
-rw-r--r--nuttx/configs/ea3152/src/up_boot.c2
-rw-r--r--nuttx/configs/ea3152/src/up_clkinit.c2
-rw-r--r--nuttx/configs/ea3152/src/up_leds.c12
-rw-r--r--nuttx/configs/eagle100/src/eagle100_internal.h4
-rw-r--r--nuttx/configs/eagle100/src/up_boot.c2
-rw-r--r--nuttx/configs/eagle100/src/up_leds.c24
-rw-r--r--nuttx/configs/ekk-lm3s9b96/src/up_boot.c2
-rw-r--r--nuttx/configs/ekk-lm3s9b96/src/up_leds.c24
-rw-r--r--nuttx/configs/ez80f910200kitg/src/ez80_leds.c12
-rw-r--r--nuttx/configs/ez80f910200zco/src/ez80_leds.c12
-rw-r--r--nuttx/configs/fire-stm32v2/src/up_autoleds.c14
-rw-r--r--nuttx/configs/fire-stm32v2/src/up_boot.c2
-rw-r--r--nuttx/configs/freedom-kl25z/src/kl_led.c8
-rw-r--r--nuttx/configs/hymini-stm32v/src/up_boot.c2
-rw-r--r--nuttx/configs/hymini-stm32v/src/up_leds.c12
-rw-r--r--nuttx/configs/kwikstik-k40/src/kwikstik-internal.h4
-rw-r--r--nuttx/configs/kwikstik-k40/src/up_boot.c2
-rw-r--r--nuttx/configs/kwikstik-k40/src/up_leds.c12
-rw-r--r--nuttx/configs/lincoln60/src/up_boot.c2
-rw-r--r--nuttx/configs/lincoln60/src/up_leds.c16
-rw-r--r--nuttx/configs/lm3s6432-s2e/src/up_boot.c2
-rw-r--r--nuttx/configs/lm3s6432-s2e/src/up_leds.c24
-rw-r--r--nuttx/configs/lm3s6965-ek/src/up_boot.c2
-rw-r--r--nuttx/configs/lm3s6965-ek/src/up_leds.c24
-rw-r--r--nuttx/configs/lm3s8962-ek/src/up_boot.c2
-rw-r--r--nuttx/configs/lm3s8962-ek/src/up_leds.c24
-rw-r--r--nuttx/configs/lm4f120-launchpad/src/lm4f_autoleds.c8
-rw-r--r--nuttx/configs/lpc4330-xplorer/src/up_autoleds.c16
-rw-r--r--nuttx/configs/lpc4330-xplorer/src/up_boot.c2
-rw-r--r--nuttx/configs/lpcxpresso-lpc1768/src/up_boot.c2
-rw-r--r--nuttx/configs/lpcxpresso-lpc1768/src/up_leds.c12
-rw-r--r--nuttx/configs/maple/src/up_boot.c2
-rw-r--r--nuttx/configs/maple/src/up_leds.c16
-rw-r--r--nuttx/configs/mbed/src/up_boot.c2
-rw-r--r--nuttx/configs/mbed/src/up_leds.c16
-rw-r--r--nuttx/configs/mcu123-lpc214x/src/up_leds.c12
-rw-r--r--nuttx/configs/mikroe-stm32f4/src/up_idle.c4
-rw-r--r--nuttx/configs/mirtoo/src/up_leds.c8
-rw-r--r--nuttx/configs/mx1ads/src/up_leds.c12
-rw-r--r--nuttx/configs/ne64badge/src/ne64badge_internal.h4
-rw-r--r--nuttx/configs/ne64badge/src/up_boot.c2
-rw-r--r--nuttx/configs/ne64badge/src/up_leds.c16
-rw-r--r--nuttx/configs/ntosd-dm320/src/up_leds.c12
-rw-r--r--nuttx/configs/nucleus2g/src/up_boot.c2
-rw-r--r--nuttx/configs/nucleus2g/src/up_leds.c16
-rw-r--r--nuttx/configs/nutiny-nuc120/src/nuc_led.c8
-rw-r--r--nuttx/configs/olimex-lpc-h3131/src/lpc31_boot.c2
-rw-r--r--nuttx/configs/olimex-lpc-h3131/src/lpc31_leds.c12
-rw-r--r--nuttx/configs/olimex-lpc-h3131/src/lpc_h3131.h4
-rw-r--r--nuttx/configs/olimex-lpc1766stk/src/up_boot.c2
-rw-r--r--nuttx/configs/olimex-lpc1766stk/src/up_leds.c16
-rw-r--r--nuttx/configs/olimex-lpc2378/src/up_leds.c12
-rw-r--r--nuttx/configs/olimex-stm32-p207/src/up_autoleds.c12
-rw-r--r--nuttx/configs/olimex-stm32-p207/src/up_boot.c2
-rw-r--r--nuttx/configs/olimex-strp711/src/up_leds.c12
-rw-r--r--nuttx/configs/open1788/src/lpc17_autoleds.c12
-rw-r--r--nuttx/configs/open1788/src/lpc17_boardinitialize.c2
-rw-r--r--nuttx/configs/pcduino-a10/src/a1x_leds.c8
-rw-r--r--nuttx/configs/pic32-starterkit/src/up_leds.c8
-rw-r--r--nuttx/configs/pic32mx7mmb/src/up_leds.c8
-rw-r--r--nuttx/configs/pjrc-8051/src/up_leds.c12
-rw-r--r--nuttx/configs/px4fmu-v2_upstream/src/px4fmu2_init.c6
-rw-r--r--nuttx/configs/qemu-i486/src/up_boot.c2
-rw-r--r--nuttx/configs/sam3u-ek/src/sam3u-ek.h4
-rw-r--r--nuttx/configs/sam3u-ek/src/up_boot.c2
-rw-r--r--nuttx/configs/sam3u-ek/src/up_leds.c12
-rw-r--r--nuttx/configs/sam4l-xplained/src/sam4l-xplained.h4
-rw-r--r--nuttx/configs/sam4l-xplained/src/sam_autoleds.c12
-rw-r--r--nuttx/configs/sam4l-xplained/src/sam_boot.c2
-rw-r--r--nuttx/configs/sam4s-xplained/src/sam4s-xplained.h4
-rw-r--r--nuttx/configs/sam4s-xplained/src/sam_autoleds.c12
-rw-r--r--nuttx/configs/sam4s-xplained/src/sam_boot.c2
-rw-r--r--nuttx/configs/sama5d3x-ek/src/sam_autoleds.c12
-rw-r--r--nuttx/configs/sama5d3x-ek/src/sam_boot.c2
-rw-r--r--nuttx/configs/sama5d3x-ek/src/sama5d3x-ek.h4
-rw-r--r--nuttx/configs/shenzhou/src/up_autoleds.c14
-rw-r--r--nuttx/configs/shenzhou/src/up_boot.c2
-rw-r--r--nuttx/configs/skp16c26/src/up_leds.c14
-rw-r--r--nuttx/configs/spark/include/board.h6
-rw-r--r--nuttx/configs/spark/src/up_autoleds.c12
-rw-r--r--nuttx/configs/spark/src/up_boot.c2
-rw-r--r--nuttx/configs/spark/src/up_userleds.c4
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_boot.c2
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_idle.c4
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_leds.c14
-rw-r--r--nuttx/configs/stm3220g-eval/src/up_autoleds.c12
-rw-r--r--nuttx/configs/stm3220g-eval/src/up_boot.c2
-rw-r--r--nuttx/configs/stm3240g-eval/src/up_autoleds.c12
-rw-r--r--nuttx/configs/stm3240g-eval/src/up_boot.c2
-rw-r--r--nuttx/configs/stm32_tiny/src/up_boot.c2
-rw-r--r--nuttx/configs/stm32_tiny/src/up_leds.c14
-rw-r--r--nuttx/configs/stm32f100rc_generic/src/up_boot.c2
-rw-r--r--nuttx/configs/stm32f100rc_generic/src/up_leds.c12
-rw-r--r--nuttx/configs/stm32f3discovery/src/up_autoleds.c20
-rw-r--r--nuttx/configs/stm32f3discovery/src/up_boot.c2
-rw-r--r--nuttx/configs/stm32f429i-disco/src/up_autoleds.c12
-rw-r--r--nuttx/configs/stm32f429i-disco/src/up_boot.c2
-rw-r--r--nuttx/configs/stm32f429i-disco/src/up_idle.c4
-rw-r--r--nuttx/configs/stm32f429i-disco/src/up_userleds.c2
-rw-r--r--nuttx/configs/stm32f4discovery/src/up_autoleds.c12
-rw-r--r--nuttx/configs/stm32f4discovery/src/up_boot.c2
-rw-r--r--nuttx/configs/stm32f4discovery/src/up_idle.c4
-rw-r--r--nuttx/configs/stm32f4discovery/src/up_userleds.c2
-rw-r--r--nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c12
-rw-r--r--nuttx/configs/stm32ldiscovery/src/stm32_boot.c2
-rw-r--r--nuttx/configs/stm32vldiscovery/src/stm32_leds.c8
-rw-r--r--nuttx/configs/sure-pic32mx/src/pic32mx_autoleds.c8
-rw-r--r--nuttx/configs/teensy/src/up_leds.c8
-rw-r--r--nuttx/configs/twr-k60n512/src/twrk60-internal.h4
-rw-r--r--nuttx/configs/twr-k60n512/src/up_boot.c2
-rw-r--r--nuttx/configs/twr-k60n512/src/up_leds.c12
-rw-r--r--nuttx/configs/ubw32/src/up_leds.c8
-rw-r--r--nuttx/configs/us7032evb1/src/up_leds.c12
-rw-r--r--nuttx/configs/viewtool-stm32f107/src/stm32_leds.c8
-rw-r--r--nuttx/configs/viewtool-stm32f107/src/viewtool_stm32f107.h2
-rw-r--r--nuttx/configs/vsn/include/power.h144
-rw-r--r--nuttx/configs/vsn/src/boot.c2
-rw-r--r--nuttx/configs/vsn/src/leds.c6
-rw-r--r--nuttx/configs/z16f2800100zcog/src/z16f_leds.c14
-rw-r--r--nuttx/configs/z8encore000zco/src/z8_leds.c14
-rw-r--r--nuttx/configs/z8f64200100kit/src/z8_leds.c12
-rw-r--r--nuttx/configs/zkit-arm-1769/src/up_boot.c2
-rw-r--r--nuttx/configs/zkit-arm-1769/src/up_leds.c12
256 files changed, 1969 insertions, 1966 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 77a400545..f92bd9ce3 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -6515,4 +6515,7 @@
* Rename up_buttons() to board_buttons() for the same reason (2014-
1-14).
* Rename up_irqbutton() to board_button_irq() (2014-1-24).
+ * Rename up_ledinit() to board_led_intialize() (2014-1-24).
+ * Rename up_ledon() to board_led_on() and up_ledoff() to board_led_off()
+ (2014-1-24).
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html
index 8c67c28ad..57f138388 100644
--- a/nuttx/Documentation/NuttxPortingGuide.html
+++ b/nuttx/Documentation/NuttxPortingGuide.html
@@ -2679,13 +2679,13 @@ else
/* Defined in board/up_leds.c */
#ifdef CONFIG_ARCH_LEDS
-extern void up_ledinit(void);
-extern void up_ledon(int led);
-extern void up_ledoff(int led);
+extern void board_led_initialize(void);
+extern void board_led_on(int led);
+extern void board_led_off(int led);
#else
-# define up_ledinit()
-# define up_ledon(led)
-# define up_ledoff(led)
+# define board_led_initialize()
+# define board_led_on(led)
+# define board_led_off(led)
#endif
</pre></ul>
<p>
@@ -2693,14 +2693,14 @@ extern void up_ledoff(int led);
<p>
<ul>
<li>
- <code>void up_ledinit(void)</code> is called early in power-up initialization to initialize the LED hardware.
+ <code>void board_led_initialize(void)</code> is called early in power-up initialization to initialize the LED hardware.
</li>
<li>
- <code>up_ledon(int led)</code> is called to instantiate the LED presentation of the event.
+ <code>board_led_on(int led)</code> is called to instantiate the LED presentation of the event.
The <code>led</code> argument is one of the definitions provided in <code><i>&lt;board-name&gt;</i>/include/board.h</code>.
</li>
<li>
- <code>up_ledoff(int led</code>is called to terminate the LED presentation of the event.
+ <code>board_led_off(int led</code>is called to terminate the LED presentation of the event.
The <code>led</code> argument is one of the definitions provided in <code><i>&lt;board-name&gt;</i>/include/board.h</code>.
Note that only <code>LED_INIRQ</code>, <code>LED_SIGNAL</code>, <code>LED_ASSERTION</code>, and <code>LED_PANIC</code>
indications are terminated.
diff --git a/nuttx/arch/8051/src/up_allocateheap.c b/nuttx/arch/8051/src/up_allocateheap.c
index 2f6a89490..483759df2 100644
--- a/nuttx/arch/8051/src/up_allocateheap.c
+++ b/nuttx/arch/8051/src/up_allocateheap.c
@@ -79,7 +79,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
{
*heap_start = (FAR void*)UP_HEAP1_BASE;
*heap_size = UP_HEAP1_END - UP_HEAP1_BASE;
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
}
#if CONFIG_MM_REGIONS > 1
diff --git a/nuttx/arch/8051/src/up_assert.c b/nuttx/arch/8051/src/up_assert.c
index 53e74feb7..c25fb81d4 100644
--- a/nuttx/arch/8051/src/up_assert.c
+++ b/nuttx/arch/8051/src/up_assert.c
@@ -76,9 +76,9 @@ static void _up_assert(int errorcode)
for(;;)
{
#ifdef CONFIG_ARCH_LEDS
- up_ledon(LED_PANIC);
+ board_led_on(LED_PANIC);
up_delay(250);
- up_ledoff(LED_PANIC);
+ board_led_off(LED_PANIC);
up_delay(250);
#endif
}
@@ -103,7 +103,7 @@ void up_assert(const uint8_t *filename, int lineno)
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
#if CONFIG_TASK_NAME_SIZE > 0
lldbg("Assertion failed at file:%s line: %d task: %s\n",
diff --git a/nuttx/arch/8051/src/up_head.S b/nuttx/arch/8051/src/up_head.S
index 47d270fc9..81653d603 100644
--- a/nuttx/arch/8051/src/up_head.S
+++ b/nuttx/arch/8051/src/up_head.S
@@ -137,7 +137,7 @@ start:
mov sp, #(STACK_BASE-1)
#ifdef CONFIG_ARCH_LEDS
- lcall _up_ledinit
+ lcall _board_led_initialize
#endif
ljmp _os_start
@@ -251,7 +251,7 @@ _up_timer0join:
#ifdef CONFIG_ARCH_LEDS
mov dpl, #LED_INIRQ
- lcall _up_ledon
+ lcall _board_led_on
#endif
/* Save the IRQ number in r2 */
@@ -443,7 +443,7 @@ _up_timer0join:
push dpl
push dph
mov dpl, #LED_INIRQ
- lcall _up_ledoff
+ lcall _board_led_off
pop dph
pop dpl
#endif
diff --git a/nuttx/arch/8051/src/up_idle.c b/nuttx/arch/8051/src/up_idle.c
index e06046c0c..02125e4e2 100644
--- a/nuttx/arch/8051/src/up_idle.c
+++ b/nuttx/arch/8051/src/up_idle.c
@@ -85,11 +85,11 @@ void up_idle(void)
g_ledtoggle++;
if (g_ledtoggle == 0x80)
{
- up_ledon(LED_IDLE);
+ board_led_on(LED_IDLE);
}
else if (g_ledtoggle == 0x00)
{
- up_ledoff(LED_IDLE);
+ board_led_off(LED_IDLE);
}
#endif
}
diff --git a/nuttx/arch/8051/src/up_initialize.c b/nuttx/arch/8051/src/up_initialize.c
index c71b6c8df..3dd9b1bdf 100644
--- a/nuttx/arch/8051/src/up_initialize.c
+++ b/nuttx/arch/8051/src/up_initialize.c
@@ -139,6 +139,6 @@ void up_initialize(void)
up_timerinit();
#endif
- up_ledon(LED_IRQSENABLED);
+ board_led_on(LED_IRQSENABLED);
}
diff --git a/nuttx/arch/8051/src/up_internal.h b/nuttx/arch/8051/src/up_internal.h
index 46f4ffb20..4260be05a 100644
--- a/nuttx/arch/8051/src/up_internal.h
+++ b/nuttx/arch/8051/src/up_internal.h
@@ -139,13 +139,13 @@ extern void up_dumpframe(FAR struct xcptcontext *context);
/* Defined in board/up_leds.c */
#ifdef CONFIG_ARCH_LEDS
-extern void up_ledinit(void);
-extern void up_ledon(uint8_t led);
-extern void up_ledoff(uint8_t led);
+extern void board_led_initialize(void);
+extern void board_led_on(uint8_t led);
+extern void board_led_off(uint8_t led);
#else
-# define up_ledinit()
-# define up_ledon(led)
-# define up_ledoff(led)
+# define board_led_initialize()
+# define board_led_on(led)
+# define board_led_off(led)
#endif
#endif /* __ASSEMBLY */
diff --git a/nuttx/arch/8051/src/up_irqtest.c b/nuttx/arch/8051/src/up_irqtest.c
index 4889ccfd1..a5a37492c 100644
--- a/nuttx/arch/8051/src/up_irqtest.c
+++ b/nuttx/arch/8051/src/up_irqtest.c
@@ -251,23 +251,23 @@ void up_dumpframe(FAR struct xcptcontext *context)
}
/************************************************************************
- * Name: up_ledinit, up_ledon, up_ledoff
+ * Name: board_led_initialize, board_led_on, board_led_off
*
* Description:
* "Fake" LED routines if needed
*
************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
}
-void up_ledon(uint8_t led)
+void board_led_on(uint8_t led)
{
led;
}
-void up_ledoff(uint8_t led)
+void board_led_off(uint8_t led)
{
led;
}
diff --git a/nuttx/arch/arm/src/arm/up_assert.c b/nuttx/arch/arm/src/arm/up_assert.c
index 9b9215b4a..c754f226a 100644
--- a/nuttx/arch/arm/src/arm/up_assert.c
+++ b/nuttx/arch/arm/src/arm/up_assert.c
@@ -263,9 +263,9 @@ static void _up_assert(int errorcode)
for(;;)
{
#ifdef CONFIG_ARCH_LEDS
- up_ledon(LED_PANIC);
+ board_led_on(LED_PANIC);
up_mdelay(250);
- up_ledoff(LED_PANIC);
+ board_led_off(LED_PANIC);
up_mdelay(250);
#endif
}
@@ -290,7 +290,7 @@ void up_assert(const uint8_t *filename, int lineno)
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
#ifdef CONFIG_PRINT_TASKNAME
lldbg("Assertion failed at file:%s line: %d task: %s\n",
diff --git a/nuttx/arch/arm/src/arm/up_doirq.c b/nuttx/arch/arm/src/arm/up_doirq.c
index 52355d43a..c548a13b5 100644
--- a/nuttx/arch/arm/src/arm/up_doirq.c
+++ b/nuttx/arch/arm/src/arm/up_doirq.c
@@ -72,7 +72,7 @@
void up_doirq(int irq, uint32_t *regs)
{
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
#ifdef CONFIG_SUPPRESS_INTERRUPTS
PANIC();
#else
@@ -112,5 +112,5 @@ void up_doirq(int irq, uint32_t *regs)
up_enable_irq(irq);
#endif
- up_ledoff(LED_INIRQ);
+ board_led_off(LED_INIRQ);
}
diff --git a/nuttx/arch/arm/src/arm/up_nommuhead.S b/nuttx/arch/arm/src/arm/up_nommuhead.S
index 618b4e9d9..9d1539fa3 100644
--- a/nuttx/arch/arm/src/arm/up_nommuhead.S
+++ b/nuttx/arch/arm/src/arm/up_nommuhead.S
@@ -125,7 +125,7 @@ __start:
/* Initialize onboard LEDs */
#ifdef CONFIG_ARCH_LEDS
- bl up_ledinit
+ bl board_led_initialize
#endif
#ifdef CONFIG_DEBUG_STACK
diff --git a/nuttx/arch/arm/src/arm/up_sigdeliver.c b/nuttx/arch/arm/src/arm/up_sigdeliver.c
index be45b75d5..1d1a20665 100644
--- a/nuttx/arch/arm/src/arm/up_sigdeliver.c
+++ b/nuttx/arch/arm/src/arm/up_sigdeliver.c
@@ -92,7 +92,7 @@ void up_sigdeliver(void)
int saved_errno = rtcb->pterrno;
- up_ledon(LED_SIGNAL);
+ board_led_on(LED_SIGNAL);
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
@@ -131,7 +131,7 @@ void up_sigdeliver(void)
/* Then restore the correct state for this thread of execution. */
- up_ledoff(LED_SIGNAL);
+ board_led_off(LED_SIGNAL);
up_fullcontextrestore(regs);
}
diff --git a/nuttx/arch/arm/src/armv6-m/up_assert.c b/nuttx/arch/arm/src/armv6-m/up_assert.c
index 47fe45887..8161d18c5 100644
--- a/nuttx/arch/arm/src/armv6-m/up_assert.c
+++ b/nuttx/arch/arm/src/armv6-m/up_assert.c
@@ -279,9 +279,9 @@ static void _up_assert(int errorcode)
for(;;)
{
#ifdef CONFIG_ARCH_LEDS
- up_ledon(LED_PANIC);
+ board_led_on(LED_PANIC);
up_mdelay(250);
- up_ledoff(LED_PANIC);
+ board_led_off(LED_PANIC);
up_mdelay(250);
#endif
}
@@ -306,7 +306,7 @@ void up_assert(const uint8_t *filename, int lineno)
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
#ifdef CONFIG_PRINT_TASKNAME
lldbg("Assertion failed at file:%s line: %d task: %s\n",
diff --git a/nuttx/arch/arm/src/armv6-m/up_doirq.c b/nuttx/arch/arm/src/armv6-m/up_doirq.c
index cf77bc47b..b3694612b 100644
--- a/nuttx/arch/arm/src/armv6-m/up_doirq.c
+++ b/nuttx/arch/arm/src/armv6-m/up_doirq.c
@@ -72,7 +72,7 @@
uint32_t *up_doirq(int irq, uint32_t *regs)
{
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
#ifdef CONFIG_SUPPRESS_INTERRUPTS
PANIC();
#else
@@ -116,6 +116,6 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
current_regs = savestate;
#endif
- up_ledoff(LED_INIRQ);
+ board_led_off(LED_INIRQ);
return regs;
}
diff --git a/nuttx/arch/arm/src/armv6-m/up_sigdeliver.c b/nuttx/arch/arm/src/armv6-m/up_sigdeliver.c
index 5a7101cf2..25c25aa08 100644
--- a/nuttx/arch/arm/src/armv6-m/up_sigdeliver.c
+++ b/nuttx/arch/arm/src/armv6-m/up_sigdeliver.c
@@ -97,7 +97,7 @@ void up_sigdeliver(void)
int saved_errno = rtcb->pterrno;
- up_ledon(LED_SIGNAL);
+ board_led_on(LED_SIGNAL);
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
@@ -139,7 +139,7 @@ void up_sigdeliver(void)
* execution.
*/
- up_ledoff(LED_SIGNAL);
+ board_led_off(LED_SIGNAL);
up_fullcontextrestore(regs);
}
diff --git a/nuttx/arch/arm/src/armv7-a/arm_assert.c b/nuttx/arch/arm/src/armv7-a/arm_assert.c
index 599bf4887..09ed223f2 100644
--- a/nuttx/arch/arm/src/armv7-a/arm_assert.c
+++ b/nuttx/arch/arm/src/armv7-a/arm_assert.c
@@ -273,9 +273,9 @@ static void _up_assert(int errorcode)
for(;;)
{
#ifdef CONFIG_ARCH_LEDS
- up_ledon(LED_PANIC);
+ board_led_on(LED_PANIC);
up_mdelay(250);
- up_ledoff(LED_PANIC);
+ board_led_off(LED_PANIC);
up_mdelay(250);
#endif
}
@@ -299,7 +299,7 @@ void up_assert(const uint8_t *filename, int lineno)
#ifdef CONFIG_PRINT_TASKNAME
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
#ifdef CONFIG_PRINT_TASKNAME
lldbg("Assertion failed at file:%s line: %d task: %s\n",
diff --git a/nuttx/arch/arm/src/armv7-a/arm_doirq.c b/nuttx/arch/arm/src/armv7-a/arm_doirq.c
index 3cd32518d..40b00626e 100644
--- a/nuttx/arch/arm/src/armv7-a/arm_doirq.c
+++ b/nuttx/arch/arm/src/armv7-a/arm_doirq.c
@@ -72,7 +72,7 @@
uint32_t *arm_doirq(int irq, uint32_t *regs)
{
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
#ifdef CONFIG_SUPPRESS_INTERRUPTS
PANIC();
#else
@@ -121,6 +121,6 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
up_enable_irq(irq);
#endif
- up_ledoff(LED_INIRQ);
+ board_led_off(LED_INIRQ);
return regs;
}
diff --git a/nuttx/arch/arm/src/armv7-a/arm_sigdeliver.c b/nuttx/arch/arm/src/armv7-a/arm_sigdeliver.c
index a62e3e60e..2cfd72fad 100644
--- a/nuttx/arch/arm/src/armv7-a/arm_sigdeliver.c
+++ b/nuttx/arch/arm/src/armv7-a/arm_sigdeliver.c
@@ -92,7 +92,7 @@ void up_sigdeliver(void)
int saved_errno = rtcb->pterrno;
- up_ledon(LED_SIGNAL);
+ board_led_on(LED_SIGNAL);
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
@@ -131,7 +131,7 @@ void up_sigdeliver(void)
/* Then restore the correct state for this thread of execution. */
- up_ledoff(LED_SIGNAL);
+ board_led_off(LED_SIGNAL);
up_fullcontextrestore(regs);
}
diff --git a/nuttx/arch/arm/src/armv7-m/up_assert.c b/nuttx/arch/arm/src/armv7-m/up_assert.c
index 7657fdb30..26b3eda1f 100644
--- a/nuttx/arch/arm/src/armv7-m/up_assert.c
+++ b/nuttx/arch/arm/src/armv7-m/up_assert.c
@@ -290,9 +290,9 @@ static void _up_assert(int errorcode)
for(;;)
{
#ifdef CONFIG_ARCH_LEDS
- up_ledon(LED_PANIC);
+ board_led_on(LED_PANIC);
up_mdelay(250);
- up_ledoff(LED_PANIC);
+ board_led_off(LED_PANIC);
up_mdelay(250);
#endif
}
@@ -317,7 +317,7 @@ void up_assert(const uint8_t *filename, int lineno)
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
#ifdef CONFIG_PRINT_TASKNAME
lldbg("Assertion failed at file:%s line: %d task: %s\n",
diff --git a/nuttx/arch/arm/src/armv7-m/up_doirq.c b/nuttx/arch/arm/src/armv7-m/up_doirq.c
index 5cb93bfc9..afad0c0d0 100644
--- a/nuttx/arch/arm/src/armv7-m/up_doirq.c
+++ b/nuttx/arch/arm/src/armv7-m/up_doirq.c
@@ -72,7 +72,7 @@
uint32_t *up_doirq(int irq, uint32_t *regs)
{
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
#ifdef CONFIG_SUPPRESS_INTERRUPTS
PANIC();
#else
@@ -116,6 +116,6 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
current_regs = savestate;
#endif
- up_ledoff(LED_INIRQ);
+ board_led_off(LED_INIRQ);
return regs;
}
diff --git a/nuttx/arch/arm/src/armv7-m/up_sigdeliver.c b/nuttx/arch/arm/src/armv7-m/up_sigdeliver.c
index 2319c48a7..b5b6c6cb6 100644
--- a/nuttx/arch/arm/src/armv7-m/up_sigdeliver.c
+++ b/nuttx/arch/arm/src/armv7-m/up_sigdeliver.c
@@ -92,7 +92,7 @@ void up_sigdeliver(void)
int saved_errno = rtcb->pterrno;
- up_ledon(LED_SIGNAL);
+ board_led_on(LED_SIGNAL);
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
@@ -142,7 +142,7 @@ void up_sigdeliver(void)
* execution.
*/
- up_ledoff(LED_SIGNAL);
+ board_led_off(LED_SIGNAL);
up_fullcontextrestore(regs);
}
diff --git a/nuttx/arch/arm/src/common/up_allocateheap.c b/nuttx/arch/arm/src/common/up_allocateheap.c
index 020d83730..9435a55b2 100644
--- a/nuttx/arch/arm/src/common/up_allocateheap.c
+++ b/nuttx/arch/arm/src/common/up_allocateheap.c
@@ -118,14 +118,14 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
/* Return the user-space heap settings */
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)ubase;
*heap_size = usize;
#else
/* Return the heap settings */
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)g_idle_topstack;
*heap_size = CONFIG_RAM_END - g_idle_topstack;
#endif
diff --git a/nuttx/arch/arm/src/common/up_createstack.c b/nuttx/arch/arm/src/common/up_createstack.c
index e14142700..44d6ce862 100644
--- a/nuttx/arch/arm/src/common/up_createstack.c
+++ b/nuttx/arch/arm/src/common/up_createstack.c
@@ -226,7 +226,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
up_stack_color(tcb->stack_alloc_ptr, tcb->adj_stack_size);
#endif
- up_ledon(LED_STACKCREATED);
+ board_led_on(LED_STACKCREATED);
return OK;
}
diff --git a/nuttx/arch/arm/src/common/up_initialize.c b/nuttx/arch/arm/src/common/up_initialize.c
index 67a034983..feb5011ce 100644
--- a/nuttx/arch/arm/src/common/up_initialize.c
+++ b/nuttx/arch/arm/src/common/up_initialize.c
@@ -207,5 +207,5 @@ void up_initialize(void)
/* Initialize USB -- device and/or host */
up_usbinitialize();
- up_ledon(LED_IRQSENABLED);
+ board_led_on(LED_IRQSENABLED);
}
diff --git a/nuttx/arch/arm/src/common/up_internal.h b/nuttx/arch/arm/src/common/up_internal.h
index 20ae8dc73..672da467a 100644
--- a/nuttx/arch/arm/src/common/up_internal.h
+++ b/nuttx/arch/arm/src/common/up_internal.h
@@ -456,13 +456,13 @@ void up_wdtinit(void);
/* LED interfaces provided by board-level logic *****************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void);
-void up_ledon(int led);
-void up_ledoff(int led);
+void board_led_initialize(void);
+void board_led_on(int led);
+void board_led_off(int led);
#else
-# define up_ledinit()
-# define up_ledon(led)
-# define up_ledoff(led)
+# define board_led_initialize()
+# define board_led_on(led)
+# define board_led_off(led)
#endif
/* Networking ***************************************************************/
diff --git a/nuttx/arch/arm/src/dm320/dm320_allocateheap.c b/nuttx/arch/arm/src/dm320/dm320_allocateheap.c
index 50b1b36e1..1ccffe3bb 100644
--- a/nuttx/arch/arm/src/dm320/dm320_allocateheap.c
+++ b/nuttx/arch/arm/src/dm320/dm320_allocateheap.c
@@ -84,7 +84,7 @@
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
{
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)g_idle_topstack;
*heap_size = (DM320_SDRAM_VADDR + CONFIG_RAM_SIZE) - g_idle_topstack;
}
diff --git a/nuttx/arch/arm/src/dm320/dm320_boot.c b/nuttx/arch/arm/src/dm320/dm320_boot.c
index df749b6da..e8041923a 100644
--- a/nuttx/arch/arm/src/dm320/dm320_boot.c
+++ b/nuttx/arch/arm/src/dm320/dm320_boot.c
@@ -227,7 +227,7 @@ void up_boot(void)
/* Set up the board-specific LEDs */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
/* Perform early serial initialization */
diff --git a/nuttx/arch/arm/src/efm32/efm32_idle.c b/nuttx/arch/arm/src/efm32/efm32_idle.c
index 0673fd099..05503c7d0 100644
--- a/nuttx/arch/arm/src/efm32/efm32_idle.c
+++ b/nuttx/arch/arm/src/efm32/efm32_idle.c
@@ -57,8 +57,8 @@
*/
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
-# define BEGIN_IDLE() up_ledon(LED_IDLE)
-# define END_IDLE() up_ledoff(LED_IDLE)
+# define BEGIN_IDLE() board_led_on(LED_IDLE)
+# define END_IDLE() board_led_off(LED_IDLE)
#else
# define BEGIN_IDLE()
# define END_IDLE()
diff --git a/nuttx/arch/arm/src/imx/imx_allocateheap.c b/nuttx/arch/arm/src/imx/imx_allocateheap.c
index be2cfb49a..dd674e3cc 100644
--- a/nuttx/arch/arm/src/imx/imx_allocateheap.c
+++ b/nuttx/arch/arm/src/imx/imx_allocateheap.c
@@ -85,7 +85,7 @@
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
{
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)g_idle_topstack;
*heap_size = (IMX_SDRAM_VSECTION + CONFIG_RAM_SIZE) - g_idle_topstack;
}
diff --git a/nuttx/arch/arm/src/imx/imx_boot.c b/nuttx/arch/arm/src/imx/imx_boot.c
index 53c656b2d..2ab89b94e 100644
--- a/nuttx/arch/arm/src/imx/imx_boot.c
+++ b/nuttx/arch/arm/src/imx/imx_boot.c
@@ -215,7 +215,7 @@ void up_boot(void)
/* Set up the board-specific LEDs */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
/* Perform early serial initialization */
diff --git a/nuttx/arch/arm/src/kinetis/kinetis_allocateheap.c b/nuttx/arch/arm/src/kinetis/kinetis_allocateheap.c
index 8f9379f0f..fab0b3cb5 100644
--- a/nuttx/arch/arm/src/kinetis/kinetis_allocateheap.c
+++ b/nuttx/arch/arm/src/kinetis/kinetis_allocateheap.c
@@ -130,7 +130,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
/* Return the user-space heap settings */
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)ubase;
*heap_size = usize;
@@ -141,7 +141,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
/* Return the heap settings */
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)g_idle_topstack;
*heap_size = CONFIG_RAM_END - g_idle_topstack;
#endif
diff --git a/nuttx/arch/arm/src/kinetis/kinetis_idle.c b/nuttx/arch/arm/src/kinetis/kinetis_idle.c
index bcf8218cb..8e2d3bbe6 100644
--- a/nuttx/arch/arm/src/kinetis/kinetis_idle.c
+++ b/nuttx/arch/arm/src/kinetis/kinetis_idle.c
@@ -52,8 +52,8 @@
*/
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
-# define BEGIN_IDLE() up_ledon(LED_IDLE)
-# define END_IDLE() up_ledoff(LED_IDLE)
+# define BEGIN_IDLE() board_led_on(LED_IDLE)
+# define END_IDLE() board_led_off(LED_IDLE)
#else
# define BEGIN_IDLE()
# define END_IDLE()
diff --git a/nuttx/arch/arm/src/kl/kl_idle.c b/nuttx/arch/arm/src/kl/kl_idle.c
index 3cc865f55..8891cf7cb 100644
--- a/nuttx/arch/arm/src/kl/kl_idle.c
+++ b/nuttx/arch/arm/src/kl/kl_idle.c
@@ -57,8 +57,8 @@
*/
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
-# define BEGIN_IDLE() up_ledon(LED_IDLE)
-# define END_IDLE() up_ledoff(LED_IDLE)
+# define BEGIN_IDLE() board_led_on(LED_IDLE)
+# define END_IDLE() board_led_off(LED_IDLE)
#else
# define BEGIN_IDLE()
# define END_IDLE()
diff --git a/nuttx/arch/arm/src/lm/lm_allocateheap.c b/nuttx/arch/arm/src/lm/lm_allocateheap.c
index fcf3291e5..08a000dd6 100644
--- a/nuttx/arch/arm/src/lm/lm_allocateheap.c
+++ b/nuttx/arch/arm/src/lm/lm_allocateheap.c
@@ -130,7 +130,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
/* Return the user-space heap settings */
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)ubase;
*heap_size = usize;
@@ -141,7 +141,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
/* Return the heap settings */
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)g_idle_topstack;
*heap_size = CONFIG_RAM_END - g_idle_topstack;
#endif
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_allocateheap.c b/nuttx/arch/arm/src/lpc17xx/lpc17_allocateheap.c
index 6fbeeb807..cc84be352 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_allocateheap.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_allocateheap.c
@@ -240,7 +240,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
/* Return the user-space heap settings */
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)ubase;
*heap_size = usize;
@@ -251,7 +251,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
/* Return the heap settings */
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)g_idle_topstack;
*heap_size = CONFIG_RAM_END - g_idle_topstack;
#endif
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_idle.c b/nuttx/arch/arm/src/lpc17xx/lpc17_idle.c
index 133847659..61a2f48ad 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_idle.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_idle.c
@@ -54,8 +54,8 @@
*/
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
-# define BEGIN_IDLE() up_ledon(LED_IDLE)
-# define END_IDLE() up_ledoff(LED_IDLE)
+# define BEGIN_IDLE() board_led_on(LED_IDLE)
+# define END_IDLE() board_led_off(LED_IDLE)
#else
# define BEGIN_IDLE()
# define END_IDLE()
diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_head.S b/nuttx/arch/arm/src/lpc214x/lpc214x_head.S
index ea2ea1220..25986def8 100644
--- a/nuttx/arch/arm/src/lpc214x/lpc214x_head.S
+++ b/nuttx/arch/arm/src/lpc214x/lpc214x_head.S
@@ -592,7 +592,7 @@ __start:
/* Initialize onboard LEDs */
#ifdef CONFIG_ARCH_LEDS
- bl up_ledinit
+ bl board_led_initialize
#endif
/* Then jump to OS entry */
diff --git a/nuttx/arch/arm/src/lpc2378/lpc23xx_head.S b/nuttx/arch/arm/src/lpc2378/lpc23xx_head.S
index 578b77753..1d489babc 100755
--- a/nuttx/arch/arm/src/lpc2378/lpc23xx_head.S
+++ b/nuttx/arch/arm/src/lpc2378/lpc23xx_head.S
@@ -192,7 +192,7 @@ __start:
/* Initialize onboard LEDs */
#ifdef CONFIG_ARCH_LEDS
- bl up_ledinit
+ bl board_led_initialize
#endif
/* Then jump to OS entry */
diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c b/nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c
index 1dd83d9f2..47136fdb8 100644
--- a/nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c
+++ b/nuttx/arch/arm/src/lpc31xx/lpc31_allocateheap.c
@@ -179,7 +179,7 @@
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
{
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)g_idle_topstack;
*heap_size = LPC31_HEAP_VEND - g_idle_topstack;
}
diff --git a/nuttx/arch/arm/src/lpc43xx/lpc43_allocateheap.c b/nuttx/arch/arm/src/lpc43xx/lpc43_allocateheap.c
index 4a5103f9e..d5d12aa54 100644
--- a/nuttx/arch/arm/src/lpc43xx/lpc43_allocateheap.c
+++ b/nuttx/arch/arm/src/lpc43xx/lpc43_allocateheap.c
@@ -247,7 +247,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
{
/* Start with the first SRAM region */
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)g_idle_topstack;
*heap_size = CONFIG_RAM_END - g_idle_topstack;
}
diff --git a/nuttx/arch/arm/src/lpc43xx/lpc43_idle.c b/nuttx/arch/arm/src/lpc43xx/lpc43_idle.c
index 72541eed8..e7be94e51 100644
--- a/nuttx/arch/arm/src/lpc43xx/lpc43_idle.c
+++ b/nuttx/arch/arm/src/lpc43xx/lpc43_idle.c
@@ -56,8 +56,8 @@
*/
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
-# define BEGIN_IDLE() up_ledon(LED_IDLE)
-# define END_IDLE() up_ledoff(LED_IDLE)
+# define BEGIN_IDLE() board_led_on(LED_IDLE)
+# define END_IDLE() board_led_off(LED_IDLE)
#else
# define BEGIN_IDLE()
# define END_IDLE()
diff --git a/nuttx/arch/arm/src/nuc1xx/nuc_idle.c b/nuttx/arch/arm/src/nuc1xx/nuc_idle.c
index 3c7fc53da..74ff353f1 100644
--- a/nuttx/arch/arm/src/nuc1xx/nuc_idle.c
+++ b/nuttx/arch/arm/src/nuc1xx/nuc_idle.c
@@ -57,8 +57,8 @@
*/
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
-# define BEGIN_IDLE() up_ledon(LED_IDLE)
-# define END_IDLE() up_ledoff(LED_IDLE)
+# define BEGIN_IDLE() board_led_on(LED_IDLE)
+# define END_IDLE() board_led_off(LED_IDLE)
#else
# define BEGIN_IDLE()
# define END_IDLE()
diff --git a/nuttx/arch/arm/src/sam34/sam_allocateheap.c b/nuttx/arch/arm/src/sam34/sam_allocateheap.c
index 595935947..a868b419d 100644
--- a/nuttx/arch/arm/src/sam34/sam_allocateheap.c
+++ b/nuttx/arch/arm/src/sam34/sam_allocateheap.c
@@ -229,7 +229,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
/* Return the user-space heap settings */
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)ubase;
*heap_size = usize;
@@ -240,7 +240,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
/* Return the heap settings */
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)g_idle_topstack;
*heap_size = CONFIG_RAM_END - g_idle_topstack;
#endif
diff --git a/nuttx/arch/arm/src/sama5/sam_allocateheap.c b/nuttx/arch/arm/src/sama5/sam_allocateheap.c
index af11d3aae..0fab6de33 100644
--- a/nuttx/arch/arm/src/sama5/sam_allocateheap.c
+++ b/nuttx/arch/arm/src/sama5/sam_allocateheap.c
@@ -213,14 +213,14 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
/* Return the user-space heap settings */
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)ubase;
*heap_size = usize;
#else
/* Return the heap settings */
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)g_idle_topstack;
*heap_size = CONFIG_RAM_VEND - g_idle_topstack;
#endif
diff --git a/nuttx/arch/arm/src/stm32/stm32_allocateheap.c b/nuttx/arch/arm/src/stm32/stm32_allocateheap.c
index f6e21e127..7ffa2e042 100644
--- a/nuttx/arch/arm/src/stm32/stm32_allocateheap.c
+++ b/nuttx/arch/arm/src/stm32/stm32_allocateheap.c
@@ -474,7 +474,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
/* Return the user-space heap settings */
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)ubase;
*heap_size = usize;
@@ -489,7 +489,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
/* Return the heap settings */
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)g_idle_topstack;
*heap_size = SRAM1_END - g_idle_topstack;
diff --git a/nuttx/arch/arm/src/stm32/stm32_idle.c b/nuttx/arch/arm/src/stm32/stm32_idle.c
index 60b81bea8..e8b51caa5 100644
--- a/nuttx/arch/arm/src/stm32/stm32_idle.c
+++ b/nuttx/arch/arm/src/stm32/stm32_idle.c
@@ -58,8 +58,8 @@
*/
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
-# define BEGIN_IDLE() up_ledon(LED_IDLE)
-# define END_IDLE() up_ledoff(LED_IDLE)
+# define BEGIN_IDLE() board_led_on(LED_IDLE)
+# define END_IDLE() board_led_off(LED_IDLE)
#else
# define BEGIN_IDLE()
# define END_IDLE()
diff --git a/nuttx/arch/arm/src/str71x/str71x_decodeirq.c b/nuttx/arch/arm/src/str71x/str71x_decodeirq.c
index e3d11454c..2316c33e6 100644
--- a/nuttx/arch/arm/src/str71x/str71x_decodeirq.c
+++ b/nuttx/arch/arm/src/str71x/str71x_decodeirq.c
@@ -90,7 +90,7 @@
void up_decodeirq(uint32_t *regs)
{
#ifdef CONFIG_SUPPRESS_INTERRUPTS
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
lowsyslog("Unexpected IRQ\n");
current_regs = regs;
PANIC();
@@ -101,7 +101,7 @@ void up_decodeirq(uint32_t *regs)
* info from CIC register without the setup).
*/
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
irq = getreg32(STR71X_EIC_IVR);
/* Verify that the resulting IRQ number is valid */
@@ -142,6 +142,6 @@ void up_decodeirq(uint32_t *regs)
PANIC(); /* Normally never happens */
}
#endif
- up_ledoff(LED_INIRQ);
+ board_led_off(LED_INIRQ);
#endif
}
diff --git a/nuttx/arch/arm/src/str71x/str71x_head.S b/nuttx/arch/arm/src/str71x/str71x_head.S
index 62951c98a..d5b40de3d 100644
--- a/nuttx/arch/arm/src/str71x/str71x_head.S
+++ b/nuttx/arch/arm/src/str71x/str71x_head.S
@@ -65,7 +65,7 @@
.globl up_earlyserialinit /* Early initialization of serial driver */
#endif
#ifdef CONFIG_ARCH_LEDS
- .globl up_ledinit /* Boot LED setup */
+ .globl board_led_initialize /* Boot LED setup */
#endif
#ifdef CONFIG_DEBUG
.globl up_lowputc /* Low-level debug output */
@@ -570,7 +570,7 @@ ctor_end:
/* Initialize onboard LEDs */
#ifdef CONFIG_ARCH_LEDS
- bl up_ledinit
+ bl board_led_initialize
#endif
/* Then jump to OS entry */
diff --git a/nuttx/arch/avr/src/avr/up_createstack.c b/nuttx/arch/avr/src/avr/up_createstack.c
index 98423be1f..e82473ef0 100644
--- a/nuttx/arch/avr/src/avr/up_createstack.c
+++ b/nuttx/arch/avr/src/avr/up_createstack.c
@@ -186,7 +186,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
tcb->adj_stack_ptr = (FAR void *)top_of_stack;
tcb->adj_stack_size = stack_size;
- up_ledon(LED_STACKCREATED);
+ board_led_on(LED_STACKCREATED);
return OK;
}
diff --git a/nuttx/arch/avr/src/avr/up_doirq.c b/nuttx/arch/avr/src/avr/up_doirq.c
index 4db08c046..0303f68f4 100644
--- a/nuttx/arch/avr/src/avr/up_doirq.c
+++ b/nuttx/arch/avr/src/avr/up_doirq.c
@@ -72,7 +72,7 @@
uint8_t *up_doirq(uint8_t irq, uint8_t *regs)
{
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
#ifdef CONFIG_SUPPRESS_INTERRUPTS
PANIC();
#else
@@ -112,7 +112,7 @@ uint8_t *up_doirq(uint8_t irq, uint8_t *regs)
current_regs = savestate;
#endif
- up_ledoff(LED_INIRQ);
+ board_led_off(LED_INIRQ);
return regs;
}
diff --git a/nuttx/arch/avr/src/avr/up_sigdeliver.c b/nuttx/arch/avr/src/avr/up_sigdeliver.c
index 400753799..7a26f9fc6 100644
--- a/nuttx/arch/avr/src/avr/up_sigdeliver.c
+++ b/nuttx/arch/avr/src/avr/up_sigdeliver.c
@@ -91,7 +91,7 @@ void up_sigdeliver(void)
int saved_errno = rtcb->pterrno;
- up_ledon(LED_SIGNAL);
+ board_led_on(LED_SIGNAL);
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
@@ -146,7 +146,7 @@ void up_sigdeliver(void)
* to the size of register save structure size will protect its contents.
*/
- up_ledoff(LED_SIGNAL);
+ board_led_off(LED_SIGNAL);
up_fullcontextrestore(regs);
}
diff --git a/nuttx/arch/avr/src/avr32/up_createstack.c b/nuttx/arch/avr/src/avr32/up_createstack.c
index 76ed2c0f5..f6e1ab635 100644
--- a/nuttx/arch/avr/src/avr32/up_createstack.c
+++ b/nuttx/arch/avr/src/avr32/up_createstack.c
@@ -193,7 +193,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
tcb->adj_stack_ptr = (FAR void *)top_of_stack;
tcb->adj_stack_size = size_of_stack;
- up_ledon(LED_STACKCREATED);
+ board_led_on(LED_STACKCREATED);
return OK;
}
diff --git a/nuttx/arch/avr/src/avr32/up_doirq.c b/nuttx/arch/avr/src/avr32/up_doirq.c
index c4513e77f..770dd613e 100644
--- a/nuttx/arch/avr/src/avr32/up_doirq.c
+++ b/nuttx/arch/avr/src/avr32/up_doirq.c
@@ -72,7 +72,7 @@
uint32_t *up_doirq(int irq, uint32_t *regs)
{
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
#ifdef CONFIG_SUPPRESS_INTERRUPTS
PANIC();
#else
@@ -112,7 +112,7 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
current_regs = savestate;
#endif
- up_ledoff(LED_INIRQ);
+ board_led_off(LED_INIRQ);
return regs;
}
diff --git a/nuttx/arch/avr/src/avr32/up_sigdeliver.c b/nuttx/arch/avr/src/avr32/up_sigdeliver.c
index d9b466890..7e0d9918a 100644
--- a/nuttx/arch/avr/src/avr32/up_sigdeliver.c
+++ b/nuttx/arch/avr/src/avr32/up_sigdeliver.c
@@ -95,7 +95,7 @@ void up_sigdeliver(void)
int saved_errno = rtcb->pterrno;
- up_ledon(LED_SIGNAL);
+ board_led_on(LED_SIGNAL);
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
@@ -149,7 +149,7 @@ void up_sigdeliver(void)
* to the size of register save structure size will protect its contents.
*/
- up_ledoff(LED_SIGNAL);
+ board_led_off(LED_SIGNAL);
up_fullcontextrestore(regs);
}
diff --git a/nuttx/arch/avr/src/common/up_allocateheap.c b/nuttx/arch/avr/src/common/up_allocateheap.c
index 970ccd7bb..b5a080d43 100644
--- a/nuttx/arch/avr/src/common/up_allocateheap.c
+++ b/nuttx/arch/avr/src/common/up_allocateheap.c
@@ -81,7 +81,7 @@
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
{
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)g_idle_topstack;
*heap_size = CONFIG_RAM_END - g_idle_topstack;
}
diff --git a/nuttx/arch/avr/src/common/up_assert.c b/nuttx/arch/avr/src/common/up_assert.c
index a9012202e..59001cd43 100644
--- a/nuttx/arch/avr/src/common/up_assert.c
+++ b/nuttx/arch/avr/src/common/up_assert.c
@@ -101,9 +101,9 @@ static void _up_assert(int errorcode)
for(;;)
{
#ifdef CONFIG_ARCH_LEDS
- up_ledon(LED_PANIC);
+ board_led_on(LED_PANIC);
up_mdelay(250);
- up_ledoff(LED_PANIC);
+ board_led_off(LED_PANIC);
up_mdelay(250);
#endif
}
@@ -128,7 +128,7 @@ void up_assert(const uint8_t *filename, int lineno)
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
#ifdef CONFIG_PRINT_TASKNAME
lldbg("Assertion failed at file:%s line: %d task: %s\n",
diff --git a/nuttx/arch/avr/src/common/up_initialize.c b/nuttx/arch/avr/src/common/up_initialize.c
index d63833de7..89840dfaf 100644
--- a/nuttx/arch/avr/src/common/up_initialize.c
+++ b/nuttx/arch/avr/src/common/up_initialize.c
@@ -237,6 +237,6 @@ void up_initialize(void)
up_usbinitialize();
- up_ledon(LED_IRQSENABLED);
+ board_led_on(LED_IRQSENABLED);
}
diff --git a/nuttx/arch/avr/src/common/up_internal.h b/nuttx/arch/avr/src/common/up_internal.h
index 189aa8d33..9f1172e62 100644
--- a/nuttx/arch/avr/src/common/up_internal.h
+++ b/nuttx/arch/avr/src/common/up_internal.h
@@ -179,11 +179,11 @@ extern void up_timerinit(void);
/* Defined in configs/<board-name>/src/up_leds.c */
#ifdef CONFIG_ARCH_LEDS
-void up_ledon(int led);
-void up_ledoff(int led);
+void board_led_on(int led);
+void board_led_off(int led);
#else
-# define up_ledon(led)
-# define up_ledoff(led)
+# define board_led_on(led)
+# define board_led_off(led)
#endif
/* Defined in chip/xxx_ethernet.c */
diff --git a/nuttx/arch/hc/src/common/up_allocateheap.c b/nuttx/arch/hc/src/common/up_allocateheap.c
index c74990779..505edd112 100644
--- a/nuttx/arch/hc/src/common/up_allocateheap.c
+++ b/nuttx/arch/hc/src/common/up_allocateheap.c
@@ -80,7 +80,7 @@
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
{
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)g_idle_topstack;
*heap_size = CONFIG_RAM_END - g_idle_topstack;
}
diff --git a/nuttx/arch/hc/src/common/up_createstack.c b/nuttx/arch/hc/src/common/up_createstack.c
index d7050f512..3272fda13 100644
--- a/nuttx/arch/hc/src/common/up_createstack.c
+++ b/nuttx/arch/hc/src/common/up_createstack.c
@@ -192,7 +192,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
- up_ledon(LED_STACKCREATED);
+ board_led_on(LED_STACKCREATED);
return OK;
}
diff --git a/nuttx/arch/hc/src/common/up_doirq.c b/nuttx/arch/hc/src/common/up_doirq.c
index 61d67d395..11adb4c6f 100644
--- a/nuttx/arch/hc/src/common/up_doirq.c
+++ b/nuttx/arch/hc/src/common/up_doirq.c
@@ -72,7 +72,7 @@
uint8_t *up_doirq(int irq, uint8_t *regs)
{
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
#ifdef CONFIG_SUPPRESS_INTERRUPTS
PANIC();
#else
@@ -112,6 +112,6 @@ uint8_t *up_doirq(int irq, uint8_t *regs)
current_regs = savestate;
#endif
- up_ledoff(LED_INIRQ);
+ board_led_off(LED_INIRQ);
return regs;
}
diff --git a/nuttx/arch/hc/src/common/up_initialize.c b/nuttx/arch/hc/src/common/up_initialize.c
index e929dab0b..d5e49442f 100644
--- a/nuttx/arch/hc/src/common/up_initialize.c
+++ b/nuttx/arch/hc/src/common/up_initialize.c
@@ -190,5 +190,5 @@ void up_initialize(void)
up_usbinitialize();
- up_ledon(LED_IRQSENABLED);
+ board_led_on(LED_IRQSENABLED);
}
diff --git a/nuttx/arch/hc/src/common/up_internal.h b/nuttx/arch/hc/src/common/up_internal.h
index faf15c0e3..cf34e6ed9 100644
--- a/nuttx/arch/hc/src/common/up_internal.h
+++ b/nuttx/arch/hc/src/common/up_internal.h
@@ -237,13 +237,13 @@ extern void up_usbuninitialize(void);
/* Board-specific functions */
#ifdef CONFIG_ARCH_LEDS
-extern void up_ledinit(void);
-extern void up_ledon(int led);
-extern void up_ledoff(int led);
+extern void board_led_initialize(void);
+extern void board_led_on(int led);
+extern void board_led_off(int led);
#else
-# define up_ledinit()
-# define up_ledon(led)
-# define up_ledoff(led)
+# define board_led_initialize()
+# define board_led_on(led)
+# define board_led_off(led)
#endif
#endif /* __ASSEMBLY__ */
diff --git a/nuttx/arch/hc/src/m9s12/m9s12_assert.c b/nuttx/arch/hc/src/m9s12/m9s12_assert.c
index 4a6292c3e..d94f97b6c 100644
--- a/nuttx/arch/hc/src/m9s12/m9s12_assert.c
+++ b/nuttx/arch/hc/src/m9s12/m9s12_assert.c
@@ -258,9 +258,9 @@ static void _up_assert(int errorcode)
for(;;)
{
#ifdef CONFIG_ARCH_LEDS
- up_ledon(LED_PANIC);
+ board_led_on(LED_PANIC);
up_mdelay(250);
- up_ledoff(LED_PANIC);
+ board_led_off(LED_PANIC);
up_mdelay(250);
#endif
}
@@ -285,7 +285,7 @@ void up_assert(const uint8_t *filename, int lineno)
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
#ifdef CONFIG_PRINT_TASKNAME
lldbg("Assertion failed at file:%s line: %d task: %s\n",
diff --git a/nuttx/arch/mips/include/pic32mx/cp0.h b/nuttx/arch/mips/include/pic32mx/cp0.h
index 67ced8a2c..9d70e2c76 100644
--- a/nuttx/arch/mips/include/pic32mx/cp0.h
+++ b/nuttx/arch/mips/include/pic32mx/cp0.h
@@ -1,396 +1,396 @@
-/****************************************************************************
- * arch/mips/include/pic32mx/cp0.h
- *
- * Copyright (C) 2011 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_MIPS_INCLUDE_PIC32MX_CP0_H
-#define __ARCH_MIPS_INCLUDE_PIC32MX_CP0_H
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <arch/mips32/cp0.h>
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-/* CP0 Register Addresses ***************************************************/
-
-#ifdef __ASSEMBLY__
-# define PIC32MX_CP0_HWRENA $7,0 /* Enables access via RDHWR hardware registers */
-# define PIC32MX_CP0_BADVADDR $8,0 /* Address of most recent exception */
-# define PIC32MX_CP0_COUNT $9,0 /* Processor cycle count */
-# define PIC32MX_CP0_COMPARE $11,0 /* Timer interrupt control */
-# define PIC32MX_CP0_STATUS $12,0 /* Processor status and control */
-# define PIC32MX_CP0_INTCTL $12,1 /* Interrupt system status and control */
-# define PIC32MX_CP0_SRSCTL $12,2 /* Shadow register set status and control */
-# define PIC32MX_CP0_SRSMAP $12,3 /* Maps from vectored interrupt to a shadow set */
-# define PIC32MX_CP0_CAUSE $13,0 /* Cause of last general exception */
-# define PIC32MX_CP0_EPC $14,0 /* Program counter at last exception */
-# define PIC32MX_CP0_PRID $15,0 /* Processor identification and revision */
-# define PIC32MX_CP0_EBASE $15,1 /* Exception vector base register */
-# define PIC32MX_CP0_CONFIG $16,0 /* Configuration register */
-# define PIC32MX_CP0_CONFIG1 $16,1 /* Configuration register 1 */
-# define PIC32MX_CP0_CONFIG2 $16,2 /* Configuration register 3 */
-# define PIC32MX_CP0_CONFIG3 $16,3 /* Configuration register 3 */
-# define PIC32MX_CP0_DEBUG $23,3 /* Debug control and exception status */
-# define PIC32MX_CP0_DEPC $24,3 /* Program counter at last debug exception */
-# define PIC32MX_CP0_ERREPC $30,3 /* Program counter at last error */
-# define PIC32MX_CP0_DESAVE $31,3 /* Debug handler scratchpad register */
-#endif
-
-/* CP0 Registers ************************************************************/
-
-/* Register Number: 0-6: Reserved
- * Compliance Level: Required for TLB-based MMU; Optional otherwise.
- */
-
-/* Register Number: 7 Sel: 0 Name: HWREna
- * Function: Enables access via the RDHWR instruction to selected hardware
- * registers in non-privileged mode.
- * Compliance Level: (Reserved for future extensions)
- */
-
-#define CP0_HWRENA_SHIFT (0) /* Bits 0-3: Enable access to a hardware resource */
-#define CP0_HWRENA_MASK (15 << CP0_HWRENA_SHIFT)
-# define CP0_HWRENA_BIT0 (1 << CP0_HWRENA_SHIFT)
-# define CP0_HWRENA_BIT1 (2 << CP0_HWRENA_SHIFT)
-# define CP0_HWRENA_BIT2 (4 << CP0_HWRENA_SHIFT)
-# define CP0_HWRENA_BIT3 (8 << CP0_HWRENA_SHIFT)
-
-/* Register Number: 8 Sel: 0 Name: BadVAddr
- * Function: Reports the address for the most recent address-related
- * exception
- * Compliance Level: Required.
- *
- * See arch/mips/include/mips32/cp0.h
- *
- * Register Number: 9 Sel: 0 Name: Count
- * Function: Processor cycle count
- * Compliance Level: Required.
- *
- * See arch/mips/include/mips32/cp0.h
- *
- * Register Number: 10 Reserved.
- * Compliance Level: Required for TLB-based MMU; Optional otherwise.
- *
- * Register Number: 11 Sel: 0 Name: Compare
- * Function: Timer interrupt control
- * Compliance Level: Required.
- *
- * See arch/mips/include/mips32/cp0.h
- */
-
-/* Register Number: 12 Sel: 0 Name: Status
- * Function: Processor status and control
- * Compliance Level: Required.
- *
- * See arch/mips/include/mips32/cp0.h
- * NOTES:
- * 1. The following are reserved bits in the PIC32:
- * CP0_STATUS_UX Bit 5: Enables 64-bit user address space (Not MIPS32)
- * CP0_STATUS_SX Bit 6: Enables 64-bit supervisor address space (Not MIPS32)
- * CP0_STATUS_KX Bit 7: Enables 64-bit kernel address space (Not MIPS32)
- * CP0_STATUS_IMPL Bits 16-17: Implementation dependent
- * CP0_STATUS_TS Bit 21: TLB detected match on multiple entries
- * CP0_STATUS_PX Bit 23: Enables 64-bit operations (Not MIPS32)
- * CP0_STATUS_MX Bit 24: Enables MDMX™ (Not MIPS32)
- */
-
-#undef CP0_STATUS_UX
-#undef CP0_STATUS_SX
-#undef CP0_STATUS_KX
-#undef CP0_STATUS_IMPL
-#undef CP0_STATUS_IMPL_SHIFT
-#undef CP0_STATUS_IMPL_MASK
-#undef CP0_STATUS_TS
-#undef CP0_STATUS_PX
-#undef CP0_STATUS_MX
-
-/* 2. The following field is of a different width. Apparently, it
- * excludes the software interrupt bits.
- *
- * CP0_STATUS_IM Bits 8-15: Interrupt Mask
- * Vs.
- * CP0_STATUS_IPL Bits 10-15: Interrupt priority level
- * Bitss 8-9 reserved
- */
-
-#define CP0_STATUS_IPL_SHIFT (10) /* Bits 10-15: Interrupt priority level */
-#define CP0_STATUS_IPL_MASK (0x3f << CP0_STATUS_IPL_SHIFT)
-
-/* 3. Supervisor mode not supported
- * CP0_STATUS_KSU Bits 3-4: Operating mode (with supervisor mode)
- */
-
-#undef CP0_STATUS_KSU_SHIFT
-#undef CP0_STATUS_KSU_MASK
-#undef CP0_STATUS_KSU_KERNEL
-#undef CP0_STATUS_KSU_SUPER
-#undef CP0_STATUS_KSU_USER
-
-/* Register Number: 12 Sel: 1 Name: IntCtl */
-
-#define CP0_INTCTL_VS_SHIFT (5) /* Bits 5-9: Vector spacing bits */
-#define CP0_INTCTL_VS_MASK (0x1f << CP0_INTCTL_VS_SHIFT)
-# define CP0_INTCTL_VS_0BYTES (0x00 << CP0_INTCTL_VS_SHIFT)
-# define CP0_INTCTL_VS_32BYTES (0x01 << CP0_INTCTL_VS_SHIFT)
-# define CP0_INTCTL_VS_64BYTES (0x02 << CP0_INTCTL_VS_SHIFT)
-# define CP0_INTCTL_VS_128BYTES (0x04 << CP0_INTCTL_VS_SHIFT)
-# define CP0_INTCTL_VS_256BYTES (0x08 << CP0_INTCTL_VS_SHIFT)
-# define CP0_INTCTL_VS_512BYTES (0x10 << CP0_INTCTL_VS_SHIFT)
-
-/* Register Number: 12 Sel: 2 Name: SRSCtl */
-
-#define CP0_SRSCTL_CSS_SHIFT (0) /* Bits 0-3: Current shadow bit set */
-#define CP0_SRSCTL_CSS_MASK (15 << CP0_SRSCTL_CSS_SHIFT)
-#define CP0_SRSCTL_PSS_SHIFT (6) /* Bits 6-9: Previous shadow set */
-#define CP0_SRSCTL_PSS_MASK (15 << CP0_SRSCTL_PSS_SHIFT)
-#define CP0_SRSCTL_ESS_SHIFT (12) /* Bits 12-15: Exception shadow sets */
-#define CP0_SRSCTL_ESS_MASK (15 << CP0_SRSCTL_ESS_SHIFT)
-#define CP0_SRSCTL_EICSS_SHIFT (18) /* Bits 18-21: External interrupt controller shadow sets */
-#define CP0_SRSCTL_EICSS_MASK (15 << CP0_SRSCTL_EICSS_SHIFT)
-#define CP0_SRSCTL_HSS_SHIFT (26) /* Bits 26-29: High shadow sets */
-#define CP0_SRSCTL_HSS_MASK (15 << CP0_SRSCTL_HSS_SHIFT)
-# define CP0_SRSCTL_HSS_1SET (0 << CP0_SRSCTL_HSS_SHIFT) /* One shadow set (normal GPR set) */
-# define CP0_SRSCTL_HSS_2SETS (1 << CP0_SRSCTL_HSS_SHIFT) /* Two shadow sets */
-# define CP0_SRSCTL_HSS_4SETS (3 << CP0_SRSCTL_HSS_SHIFT) /* Four shadow sets */
-
-/* Register Number: 12 Sel: 3 Name: SRSMap */
-
-#define CP0_SRSMAP_SSV0_SHIFT (0) /* Bits 0-3: Shadow set vector 0 */
-#define CP0_SRSMAP_SSV0_MASK (15 << CP0_SRSMAP_SSV0_SHIFT)
-#define CP0_SRSMAP_SSV1_SHIFT (4) /* Bits 4-7: Shadow set vector 1 */
-#define CP0_SRSMAP_SSV1_MASK (15 << CP0_SRSMAP_SSV1_SHIFT)
-#define CP0_SRSMAP_SSV2_SHIFT (8) /* Bits 8-11: Shadow set vector 2 */
-#define CP0_SRSMAP_SSV2_MASK (15 << CP0_SRSMAP_SSV2_SHIFT)
-#define CP0_SRSMAP_SSV3_SHIFT (12) /* Bits 12-15: Shadow set vector 3 */
-#define CP0_SRSMAP_SSV3_MASK (15 << CP0_SRSMAP_SSV3_SHIFT)
-#define CP0_SRSMAP_SSV4_SHIFT (16) /* Bits 16-19: Shadow set vector 4 */
-#define CP0_SRSMAP_SSV4_MASK (15 << CP0_SRSMAP_SSV4_SHIFT)
-#define CP0_SRSMAP_SSV5_SHIFT (20) /* Bits 20-23: Shadow set vector 5 */
-#define CP0_SRSMAP_SSV5_MASK (15 << CP0_SRSMAP_SSV5_SHIFT)
-#define CP0_SRSMAP_SSV6_SHIFT (24) /* Bits 24-27: Shadow set vector 6 */
-#define CP0_SRSMAP_SSV6_MASK (15 << CP0_SRSMAP_SSV6_SHIFT)
-#define CP0_SRSMAP_SSV7_SHIFT (28) /* Bits 28-31: Shadow set vector 7 */
-#define CP0_SRSMAP_SSV7_MASK (15 << CP0_SRSMAP_SSV7_SHIFT)
-
-/* Register Number: 13 Sel: 0 Name: Cause
- * Function: Cause of last general exception
- * Compliance Level: Required.
- *
- * See arch/mips/include/mips32/cp0.h
- * NOTES: The following bits are added in the PIC32:
- */
-
-#define CP0_CAUSE_R (1 << 26) /* Bit 26: R bit */
-#define CP0_CAUSE_DC (1 << 27) /* Bit 27: Disable count */
-#define CP0_CAUSE_TI (1 << 30) /* Bit 30: Timer interrupt bit *.
-
-/* Register Number: 14 Sel: 0 Name: EPC
- * Function: Program counter at last exception
- * Compliance Level: Required.
- *
- * See arch/mips/include/mips32/cp0.h
- */
-
-/* Register Number: 15 Sel: 0 Name: PRId
- * Function: Processor identification and revision
- * Compliance Level: Required.
- *
- * See arch/mips/include/mips32/cp0.h
- * NOTE: Slightly different bit interpretations of some fields:
- */
-
-#define CP0_PRID_PATCH_SHIFT (5) /* Bits 0-1: Patch level */
-#define CP0_PRID_PATCH_MASK (3 << CP0_PRID_PATCH_SHIFT)
-#define CP0_PRID_MINOR_SHIFT (2) /* Bits 2-4: Minor revision number */
-#define CP0_PRID_MINOR_MASK (7 << CP0_PRID_MINOR_SHIFT)
-#define CP0_PRID_MAJOR_SHIFT (5) /* Bits 5-7: Major revision number */
-#define CP0_PRID_MAJOR_MASK (7 << CP0_PRID_MAJOR_SHIFT)
-
-#undef CP0_PRID_OPTIONS_SHIFT
-#undef CP0_PRID_OPTIONS_MASK
-
-/* Register Number: 15 Sel: 1 Name: EBASE */
-
-#define CP_EBASE_CPUNUM_SHIFT (0) /* Bits 0-9: CPU number */
-#define CP_EBASE_CPUNUM_MASK (0x3ff << CP_EBASE_CPUNUM_SHIFT)
-#define CP_EBASE_SHIFT (12) /* Bits 30-31=10, Bits 12-29: Exception base */
-#define CP_EBASE_MASK (0x3ffff << CP_EBASE_SHIFT)
-
-/* Register Number: 16 Sel: 0 Name: Config
- * Function: Configuration register
- * Compliance Level: Required.
- *
- * See arch/mips/include/mips32/cp0.h
- * 1. PIC32MX is always little-endian.
- * 2. Implementation specific bits defined.
- */
-
-#undef CP0_CONFIG_IMPL_SHIFT
-#undef CP0_CONFIG_IMPL_MASK
-
-#define CP0_CONFIG_K23_SHIFT (0) /* Bits 28-30: KSEG2 and KSEG3 cacheability */
-#define CP0_CONFIG_K23_MASK (7 << CP0_CONFIG_K23_SHIFT)
-# define CP0_CONFIG_K23_UNCACHED (2 << CP0_CONFIG_K23_SHIFT)
-# define CP0_CONFIG_K23_CACHEABLE (3 << CP0_CONFIG_K23_SHIFT)
-#define CP0_CONFIG_KU_SHIFT (0) /* Bits 0-2: KUSEG and USEG cacheability */
-#define CP0_CONFIG_KU_MASK (7 << CP0_CONFIG_KU_SHIFT)
-# define CP0_CONFIG_KU_UNCACHED (2 << CP0_CONFIG_KU_SHIFT)
-# define CP0_CONFIG_KU_CACHEABLE (3 << CP0_CONFIG_KU_SHIFT)
-#define CP0_CONFIG_UDI (1 << 22) /* Bit 22: User defined bit */
-#define CP0_CONFIG_SB (1 << 21) /* Bit 32: Simple BE bus mode bit */
-#define CP0_CONFIG_MDU (1 << 20) /* Multipley/Divide unit bit */
-#define CP0_CONFIG_DS (1 << 16) /* Dual SRAM bit */
-
-/* Register Number: 16 Sel: 1 Name: Config1
- * Function: Configuration register 1
- * Compliance Level: Required.
- *
- * See arch/mips/include/mips32/cp0.h
- *
- * Register Number: 16 Sel: 2 Name: Config2
- * Function: Configuration register 2
- * Compliance Level: Optional.
- *
- * See arch/mips/include/mips32/cp0.h
- */
-
-#undef CP0_CONFIG2_TBS_SHIFT
-#undef CP0_CONFIG2_TBS_MASK
-
-/* Register Number: 16 Sel: 3 Name: Config3
- * Function: Configuration register 3
- * Compliance Level: Optional.
- *
- * See arch/mips/include/mips32/cp0.h
- */
-
-#define CP0_CONFIG3_SP (1 << 4) /* Bit 4: Support page bit */
-#define CP0_CONFIG3_VINT (1 << 5) /* Bit 5: Vector interrupt bit */
-#define CP0_CONFIG3_VEIC (1 << 6) /* Bit 6: External interrupt controller supported */
-
-/* Register Number: 17-22 Reserved
- * Compliance Level: Optional.
- */
-
-/* Register Number: 23 Sel: 0 Name: Debug
- * Function: EJTAG Debug register
- * Compliance Level: Optional.
- */
-
-#define CP0_DEBUG_DSS (1 << 0) /* Bit 0: Debug single-step exception */
-#define CP0_DEBUG_DBP (1 << 1) /* Bit 1: Debug software breakpoint exception */
-#define CP0_DEBUG_DDBL (1 << 2) /* Bit 2: Debug data break exception on load */
-#define CP0_DEBUG_DDBS (1 << 3) /* Bit 3: Debug data break exception on store */
-#define CP0_DEBUG_DIB (1 << 4) /* Bit 4: Debug instruction break exception */
-#define CP0_DEBUG_DINT (1 << 5) /* Bit 5: Debug interrupt exception */
-#define CP0_DEBUG_SST (1 << 8) /* Bit 6: Enable debug single step exception */
-#define CP0_DEBUG_NOSST (1 << 9) /* Bit 7: No single step feature available */
-#define CP0_DEBUG_DEXCCODE_SHIFT (10) /* Bits 10-14: Cause of latest exception in DEBUG mode */
-#define CP0_DEBUG_DEXCCODE_MASK (31 << CP0_DEBUG_DEXCCODE_SHIFT)
-#define CP0_DEBUG_VER_SHIFT (15) /* Bits 15-17: EJTAG version */
-#define CP0_DEBUG_VER_MASK (7 << CP0_DEBUG_VER_SHIFT)
-#define CP0_DEBUG_DDBLIMPR (1 << 18) /* Bit 18: Imprecise debug data break load instruction */
-#define CP0_DEBUG_DDBSIMPR (1 << 19) /* Bit 19: Imprecise debug data break store instruction */
-#define CP0_DEBUG_IEXI (1 << 20) /* Bit 20: Imprecise error exception inhibit */
-#define CP0_DEBUG_DBUSEP (1 << 21) /* Bit 21: Data access bus error exception pending */
-#define CP0_DEBUG_CACHEEP (1 << 22) /* Bit 22: Imprecise cache error exception is pending */
-#define CP0_DEBUG_MCHECKP (1 << 23) /* Bit 23: Imprecise machine check exception is pending */
-#define CP0_DEBUG_IBUSEP (1 << 24) /* Bit 24: Bus error exception pending */
-#define CP0_DEBUG_COUNTDM (1 << 25) /* Bit 25: Count register behavior (1=running) */
-#define CP0_DEBUG_HALT (1 << 26) /* Bit 26: Internal system bus clock stopped */
-#define CP0_DEBUG_DOZE (1 << 27) /* Bit 27: Processor in low power mode */
-#define CP0_DEBUG_LSNM (1 << 28) /* Bit 28: Load/store in DSEG goes to main memory */
-#define CP0_DEBUG_NODCR (1 << 29) /* Bit 29: No DSEG preset */
-#define CP0_DEBUG_DM (1 << 30) /* Bit 30: Processor is operating in DEBUG mode */
-#define CP0_DEBUG_DBD (1 << 31) /* Bit 31: Last debug exception occurred in a dely slot */
-
-/* Register Number: 23 Sel: ? Name: Debug2
- * Is this documented anywhere?
- */
-
-/* Register Number: 24 Sel: 0 Name: DEPC
- * Function: Program counter at last EJTAG debug exception
- * Compliance Level: Optional.
- *
- * See arch/mips/include/mips32/cp0.h
- *
- * Register Number: 25-29 Reserved
- * Compliance Level: Recommended/Optional.
- *
- * Register Number: 30 Sel: 0 Name: ErrorEPC
- * Function: Program counter at last error
- * Compliance Level: Required.
- *
- * See arch/mips/include/mips32/cp0.h
- *
- * Register Number: 31 Sel: 0 Name: DeSAVE
- * Function: EJTAG debug exception save register
- * Compliance Level: Optional.
- *
- * See arch/mips/include/mips32/cp0.h
- */
-
-/****************************************************************************
- * Public Types
- ****************************************************************************/
-
-#ifndef __ASSEMBLY__
-
-/****************************************************************************
- * Inline Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Function Prototypes
- ****************************************************************************/
-
-#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
-#endif
-
-#undef EXTERN
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __ASSEMBLY__ */
-#endif /* __ARCH_MIPS_INCLUDE_PIC32MX_CP0_H */
+/****************************************************************************
+ * arch/mips/include/pic32mx/cp0.h
+ *
+ * Copyright (C) 2011 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_MIPS_INCLUDE_PIC32MX_CP0_H
+#define __ARCH_MIPS_INCLUDE_PIC32MX_CP0_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <arch/mips32/cp0.h>
+
+/****************************************************************************
+ * Pre-Processor Definitions
+ ****************************************************************************/
+/* CP0 Register Addresses ***************************************************/
+
+#ifdef __ASSEMBLY__
+# define PIC32MX_CP0_HWRENA $7,0 /* Enables access via RDHWR hardware registers */
+# define PIC32MX_CP0_BADVADDR $8,0 /* Address of most recent exception */
+# define PIC32MX_CP0_COUNT $9,0 /* Processor cycle count */
+# define PIC32MX_CP0_COMPARE $11,0 /* Timer interrupt control */
+# define PIC32MX_CP0_STATUS $12,0 /* Processor status and control */
+# define PIC32MX_CP0_INTCTL $12,1 /* Interrupt system status and control */
+# define PIC32MX_CP0_SRSCTL $12,2 /* Shadow register set status and control */
+# define PIC32MX_CP0_SRSMAP $12,3 /* Maps from vectored interrupt to a shadow set */
+# define PIC32MX_CP0_CAUSE $13,0 /* Cause of last general exception */
+# define PIC32MX_CP0_EPC $14,0 /* Program counter at last exception */
+# define PIC32MX_CP0_PRID $15,0 /* Processor identification and revision */
+# define PIC32MX_CP0_EBASE $15,1 /* Exception vector base register */
+# define PIC32MX_CP0_CONFIG $16,0 /* Configuration register */
+# define PIC32MX_CP0_CONFIG1 $16,1 /* Configuration register 1 */
+# define PIC32MX_CP0_CONFIG2 $16,2 /* Configuration register 3 */
+# define PIC32MX_CP0_CONFIG3 $16,3 /* Configuration register 3 */
+# define PIC32MX_CP0_DEBUG $23,3 /* Debug control and exception status */
+# define PIC32MX_CP0_DEPC $24,3 /* Program counter at last debug exception */
+# define PIC32MX_CP0_ERREPC $30,3 /* Program counter at last error */
+# define PIC32MX_CP0_DESAVE $31,3 /* Debug handler scratchpad register */
+#endif
+
+/* CP0 Registers ************************************************************/
+
+/* Register Number: 0-6: Reserved
+ * Compliance Level: Required for TLB-based MMU; Optional otherwise.
+ */
+
+/* Register Number: 7 Sel: 0 Name: HWREna
+ * Function: Enables access via the RDHWR instruction to selected hardware
+ * registers in non-privileged mode.
+ * Compliance Level: (Reserved for future extensions)
+ */
+
+#define CP0_HWRENA_SHIFT (0) /* Bits 0-3: Enable access to a hardware resource */
+#define CP0_HWRENA_MASK (15 << CP0_HWRENA_SHIFT)
+# define CP0_HWRENA_BIT0 (1 << CP0_HWRENA_SHIFT)
+# define CP0_HWRENA_BIT1 (2 << CP0_HWRENA_SHIFT)
+# define CP0_HWRENA_BIT2 (4 << CP0_HWRENA_SHIFT)
+# define CP0_HWRENA_BIT3 (8 << CP0_HWRENA_SHIFT)
+
+/* Register Number: 8 Sel: 0 Name: BadVAddr
+ * Function: Reports the address for the most recent address-related
+ * exception
+ * Compliance Level: Required.
+ *
+ * See arch/mips/include/mips32/cp0.h
+ *
+ * Register Number: 9 Sel: 0 Name: Count
+ * Function: Processor cycle count
+ * Compliance Level: Required.
+ *
+ * See arch/mips/include/mips32/cp0.h
+ *
+ * Register Number: 10 Reserved.
+ * Compliance Level: Required for TLB-based MMU; Optional otherwise.
+ *
+ * Register Number: 11 Sel: 0 Name: Compare
+ * Function: Timer interrupt control
+ * Compliance Level: Required.
+ *
+ * See arch/mips/include/mips32/cp0.h
+ */
+
+/* Register Number: 12 Sel: 0 Name: Status
+ * Function: Processor status and control
+ * Compliance Level: Required.
+ *
+ * See arch/mips/include/mips32/cp0.h
+ * NOTES:
+ * 1. The following are reserved bits in the PIC32:
+ * CP0_STATUS_UX Bit 5: Enables 64-bit user address space (Not MIPS32)
+ * CP0_STATUS_SX Bit 6: Enables 64-bit supervisor address space (Not MIPS32)
+ * CP0_STATUS_KX Bit 7: Enables 64-bit kernel address space (Not MIPS32)
+ * CP0_STATUS_IMPL Bits 16-17: Implementation dependent
+ * CP0_STATUS_TS Bit 21: TLB detected match on multiple entries
+ * CP0_STATUS_PX Bit 23: Enables 64-bit operations (Not MIPS32)
+ * CP0_STATUS_MX Bit 24: Enables MDMX™ (Not MIPS32)
+ */
+
+#undef CP0_STATUS_UX
+#undef CP0_STATUS_SX
+#undef CP0_STATUS_KX
+#undef CP0_STATUS_IMPL
+#undef CP0_STATUS_IMPL_SHIFT
+#undef CP0_STATUS_IMPL_MASK
+#undef CP0_STATUS_TS
+#undef CP0_STATUS_PX
+#undef CP0_STATUS_MX
+
+/* 2. The following field is of a different width. Apparently, it
+ * excludes the software interrupt bits.
+ *
+ * CP0_STATUS_IM Bits 8-15: Interrupt Mask
+ * Vs.
+ * CP0_STATUS_IPL Bits 10-15: Interrupt priority level
+ * Bitss 8-9 reserved
+ */
+
+#define CP0_STATUS_IPL_SHIFT (10) /* Bits 10-15: Interrupt priority level */
+#define CP0_STATUS_IPL_MASK (0x3f << CP0_STATUS_IPL_SHIFT)
+
+/* 3. Supervisor mode not supported
+ * CP0_STATUS_KSU Bits 3-4: Operating mode (with supervisor mode)
+ */
+
+#undef CP0_STATUS_KSU_SHIFT
+#undef CP0_STATUS_KSU_MASK
+#undef CP0_STATUS_KSU_KERNEL
+#undef CP0_STATUS_KSU_SUPER
+#undef CP0_STATUS_KSU_USER
+
+/* Register Number: 12 Sel: 1 Name: IntCtl */
+
+#define CP0_INTCTL_VS_SHIFT (5) /* Bits 5-9: Vector spacing bits */
+#define CP0_INTCTL_VS_MASK (0x1f << CP0_INTCTL_VS_SHIFT)
+# define CP0_INTCTL_VS_0BYTES (0x00 << CP0_INTCTL_VS_SHIFT)
+# define CP0_INTCTL_VS_32BYTES (0x01 << CP0_INTCTL_VS_SHIFT)
+# define CP0_INTCTL_VS_64BYTES (0x02 << CP0_INTCTL_VS_SHIFT)
+# define CP0_INTCTL_VS_128BYTES (0x04 << CP0_INTCTL_VS_SHIFT)
+# define CP0_INTCTL_VS_256BYTES (0x08 << CP0_INTCTL_VS_SHIFT)
+# define CP0_INTCTL_VS_512BYTES (0x10 << CP0_INTCTL_VS_SHIFT)
+
+/* Register Number: 12 Sel: 2 Name: SRSCtl */
+
+#define CP0_SRSCTL_CSS_SHIFT (0) /* Bits 0-3: Current shadow bit set */
+#define CP0_SRSCTL_CSS_MASK (15 << CP0_SRSCTL_CSS_SHIFT)
+#define CP0_SRSCTL_PSS_SHIFT (6) /* Bits 6-9: Previous shadow set */
+#define CP0_SRSCTL_PSS_MASK (15 << CP0_SRSCTL_PSS_SHIFT)
+#define CP0_SRSCTL_ESS_SHIFT (12) /* Bits 12-15: Exception shadow sets */
+#define CP0_SRSCTL_ESS_MASK (15 << CP0_SRSCTL_ESS_SHIFT)
+#define CP0_SRSCTL_EICSS_SHIFT (18) /* Bits 18-21: External interrupt controller shadow sets */
+#define CP0_SRSCTL_EICSS_MASK (15 << CP0_SRSCTL_EICSS_SHIFT)
+#define CP0_SRSCTL_HSS_SHIFT (26) /* Bits 26-29: High shadow sets */
+#define CP0_SRSCTL_HSS_MASK (15 << CP0_SRSCTL_HSS_SHIFT)
+# define CP0_SRSCTL_HSS_1SET (0 << CP0_SRSCTL_HSS_SHIFT) /* One shadow set (normal GPR set) */
+# define CP0_SRSCTL_HSS_2SETS (1 << CP0_SRSCTL_HSS_SHIFT) /* Two shadow sets */
+# define CP0_SRSCTL_HSS_4SETS (3 << CP0_SRSCTL_HSS_SHIFT) /* Four shadow sets */
+
+/* Register Number: 12 Sel: 3 Name: SRSMap */
+
+#define CP0_SRSMAP_SSV0_SHIFT (0) /* Bits 0-3: Shadow set vector 0 */
+#define CP0_SRSMAP_SSV0_MASK (15 << CP0_SRSMAP_SSV0_SHIFT)
+#define CP0_SRSMAP_SSV1_SHIFT (4) /* Bits 4-7: Shadow set vector 1 */
+#define CP0_SRSMAP_SSV1_MASK (15 << CP0_SRSMAP_SSV1_SHIFT)
+#define CP0_SRSMAP_SSV2_SHIFT (8) /* Bits 8-11: Shadow set vector 2 */
+#define CP0_SRSMAP_SSV2_MASK (15 << CP0_SRSMAP_SSV2_SHIFT)
+#define CP0_SRSMAP_SSV3_SHIFT (12) /* Bits 12-15: Shadow set vector 3 */
+#define CP0_SRSMAP_SSV3_MASK (15 << CP0_SRSMAP_SSV3_SHIFT)
+#define CP0_SRSMAP_SSV4_SHIFT (16) /* Bits 16-19: Shadow set vector 4 */
+#define CP0_SRSMAP_SSV4_MASK (15 << CP0_SRSMAP_SSV4_SHIFT)
+#define CP0_SRSMAP_SSV5_SHIFT (20) /* Bits 20-23: Shadow set vector 5 */
+#define CP0_SRSMAP_SSV5_MASK (15 << CP0_SRSMAP_SSV5_SHIFT)
+#define CP0_SRSMAP_SSV6_SHIFT (24) /* Bits 24-27: Shadow set vector 6 */
+#define CP0_SRSMAP_SSV6_MASK (15 << CP0_SRSMAP_SSV6_SHIFT)
+#define CP0_SRSMAP_SSV7_SHIFT (28) /* Bits 28-31: Shadow set vector 7 */
+#define CP0_SRSMAP_SSV7_MASK (15 << CP0_SRSMAP_SSV7_SHIFT)
+
+/* Register Number: 13 Sel: 0 Name: Cause
+ * Function: Cause of last general exception
+ * Compliance Level: Required.
+ *
+ * See arch/mips/include/mips32/cp0.h
+ * NOTES: The following bits are added in the PIC32:
+ */
+
+#define CP0_CAUSE_R (1 << 26) /* Bit 26: R bit */
+#define CP0_CAUSE_DC (1 << 27) /* Bit 27: Disable count */
+#define CP0_CAUSE_TI (1 << 30) /* Bit 30: Timer interrupt bit *.
+
+/* Register Number: 14 Sel: 0 Name: EPC
+ * Function: Program counter at last exception
+ * Compliance Level: Required.
+ *
+ * See arch/mips/include/mips32/cp0.h
+ */
+
+/* Register Number: 15 Sel: 0 Name: PRId
+ * Function: Processor identification and revision
+ * Compliance Level: Required.
+ *
+ * See arch/mips/include/mips32/cp0.h
+ * NOTE: Slightly different bit interpretations of some fields:
+ */
+
+#define CP0_PRID_PATCH_SHIFT (5) /* Bits 0-1: Patch level */
+#define CP0_PRID_PATCH_MASK (3 << CP0_PRID_PATCH_SHIFT)
+#define CP0_PRID_MINOR_SHIFT (2) /* Bits 2-4: Minor revision number */
+#define CP0_PRID_MINOR_MASK (7 << CP0_PRID_MINOR_SHIFT)
+#define CP0_PRID_MAJOR_SHIFT (5) /* Bits 5-7: Major revision number */
+#define CP0_PRID_MAJOR_MASK (7 << CP0_PRID_MAJOR_SHIFT)
+
+#undef CP0_PRID_OPTIONS_SHIFT
+#undef CP0_PRID_OPTIONS_MASK
+
+/* Register Number: 15 Sel: 1 Name: EBASE */
+
+#define CP_EBASE_CPUNUM_SHIFT (0) /* Bits 0-9: CPU number */
+#define CP_EBASE_CPUNUM_MASK (0x3ff << CP_EBASE_CPUNUM_SHIFT)
+#define CP_EBASE_SHIFT (12) /* Bits 30-31=10, Bits 12-29: Exception base */
+#define CP_EBASE_MASK (0x3ffff << CP_EBASE_SHIFT)
+
+/* Register Number: 16 Sel: 0 Name: Config
+ * Function: Configuration register
+ * Compliance Level: Required.
+ *
+ * See arch/mips/include/mips32/cp0.h
+ * 1. PIC32MX is always little-endian.
+ * 2. Implementation specific bits defined.
+ */
+
+#undef CP0_CONFIG_IMPL_SHIFT
+#undef CP0_CONFIG_IMPL_MASK
+
+#define CP0_CONFIG_K23_SHIFT (0) /* Bits 28-30: KSEG2 and KSEG3 cacheability */
+#define CP0_CONFIG_K23_MASK (7 << CP0_CONFIG_K23_SHIFT)
+# define CP0_CONFIG_K23_UNCACHED (2 << CP0_CONFIG_K23_SHIFT)
+# define CP0_CONFIG_K23_CACHEABLE (3 << CP0_CONFIG_K23_SHIFT)
+#define CP0_CONFIG_KU_SHIFT (0) /* Bits 0-2: KUSEG and USEG cacheability */
+#define CP0_CONFIG_KU_MASK (7 << CP0_CONFIG_KU_SHIFT)
+# define CP0_CONFIG_KU_UNCACHED (2 << CP0_CONFIG_KU_SHIFT)
+# define CP0_CONFIG_KU_CACHEABLE (3 << CP0_CONFIG_KU_SHIFT)
+#define CP0_CONFIG_UDI (1 << 22) /* Bit 22: User defined bit */
+#define CP0_CONFIG_SB (1 << 21) /* Bit 32: Simple BE bus mode bit */
+#define CP0_CONFIG_MDU (1 << 20) /* Multipley/Divide unit bit */
+#define CP0_CONFIG_DS (1 << 16) /* Dual SRAM bit */
+
+/* Register Number: 16 Sel: 1 Name: Config1
+ * Function: Configuration register 1
+ * Compliance Level: Required.
+ *
+ * See arch/mips/include/mips32/cp0.h
+ *
+ * Register Number: 16 Sel: 2 Name: Config2
+ * Function: Configuration register 2
+ * Compliance Level: Optional.
+ *
+ * See arch/mips/include/mips32/cp0.h
+ */
+
+#undef CP0_CONFIG2_TBS_SHIFT
+#undef CP0_CONFIG2_TBS_MASK
+
+/* Register Number: 16 Sel: 3 Name: Config3
+ * Function: Configuration register 3
+ * Compliance Level: Optional.
+ *
+ * See arch/mips/include/mips32/cp0.h
+ */
+
+#define CP0_CONFIG3_SP (1 << 4) /* Bit 4: Support page bit */
+#define CP0_CONFIG3_VINT (1 << 5) /* Bit 5: Vector interrupt bit */
+#define CP0_CONFIG3_VEIC (1 << 6) /* Bit 6: External interrupt controller supported */
+
+/* Register Number: 17-22 Reserved
+ * Compliance Level: Optional.
+ */
+
+/* Register Number: 23 Sel: 0 Name: Debug
+ * Function: EJTAG Debug register
+ * Compliance Level: Optional.
+ */
+
+#define CP0_DEBUG_DSS (1 << 0) /* Bit 0: Debug single-step exception */
+#define CP0_DEBUG_DBP (1 << 1) /* Bit 1: Debug software breakpoint exception */
+#define CP0_DEBUG_DDBL (1 << 2) /* Bit 2: Debug data break exception on load */
+#define CP0_DEBUG_DDBS (1 << 3) /* Bit 3: Debug data break exception on store */
+#define CP0_DEBUG_DIB (1 << 4) /* Bit 4: Debug instruction break exception */
+#define CP0_DEBUG_DINT (1 << 5) /* Bit 5: Debug interrupt exception */
+#define CP0_DEBUG_SST (1 << 8) /* Bit 6: Enable debug single step exception */
+#define CP0_DEBUG_NOSST (1 << 9) /* Bit 7: No single step feature available */
+#define CP0_DEBUG_DEXCCODE_SHIFT (10) /* Bits 10-14: Cause of latest exception in DEBUG mode */
+#define CP0_DEBUG_DEXCCODE_MASK (31 << CP0_DEBUG_DEXCCODE_SHIFT)
+#define CP0_DEBUG_VER_SHIFT (15) /* Bits 15-17: EJTAG version */
+#define CP0_DEBUG_VER_MASK (7 << CP0_DEBUG_VER_SHIFT)
+#define CP0_DEBUG_DDBLIMPR (1 << 18) /* Bit 18: Imprecise debug data break load instruction */
+#define CP0_DEBUG_DDBSIMPR (1 << 19) /* Bit 19: Imprecise debug data break store instruction */
+#define CP0_DEBUG_IEXI (1 << 20) /* Bit 20: Imprecise error exception inhibit */
+#define CP0_DEBUG_DBUSEP (1 << 21) /* Bit 21: Data access bus error exception pending */
+#define CP0_DEBUG_CACHEEP (1 << 22) /* Bit 22: Imprecise cache error exception is pending */
+#define CP0_DEBUG_MCHECKP (1 << 23) /* Bit 23: Imprecise machine check exception is pending */
+#define CP0_DEBUG_IBUSEP (1 << 24) /* Bit 24: Bus error exception pending */
+#define CP0_DEBUG_COUNTDM (1 << 25) /* Bit 25: Count register behavior (1=running) */
+#define CP0_DEBUG_HALT (1 << 26) /* Bit 26: Internal system bus clock stopped */
+#define CP0_DEBUG_DOZE (1 << 27) /* Bit 27: Processor in low power mode */
+#define CP0_DEBUG_LSNM (1 << 28) /* Bit 28: Load/store in DSEG goes to main memory */
+#define CP0_DEBUG_NODCR (1 << 29) /* Bit 29: No DSEG preset */
+#define CP0_DEBUG_DM (1 << 30) /* Bit 30: Processor is operating in DEBUG mode */
+#define CP0_DEBUG_DBD (1 << 31) /* Bit 31: Last debug exception occurred in a dely slot */
+
+/* Register Number: 23 Sel: ? Name: Debug2
+ * Is this documented anywhere?
+ */
+
+/* Register Number: 24 Sel: 0 Name: DEPC
+ * Function: Program counter at last EJTAG debug exception
+ * Compliance Level: Optional.
+ *
+ * See arch/mips/include/mips32/cp0.h
+ *
+ * Register Number: 25-29 Reserved
+ * Compliance Level: Recommended/Optional.
+ *
+ * Register Number: 30 Sel: 0 Name: ErrorEPC
+ * Function: Program counter at last error
+ * Compliance Level: Required.
+ *
+ * See arch/mips/include/mips32/cp0.h
+ *
+ * Register Number: 31 Sel: 0 Name: DeSAVE
+ * Function: EJTAG debug exception save register
+ * Compliance Level: Optional.
+ *
+ * See arch/mips/include/mips32/cp0.h
+ */
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/****************************************************************************
+ * Inline Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C" {
+#else
+#define EXTERN extern
+#endif
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ASSEMBLY__ */
+#endif /* __ARCH_MIPS_INCLUDE_PIC32MX_CP0_H */
diff --git a/nuttx/arch/mips/src/common/up_allocateheap.c b/nuttx/arch/mips/src/common/up_allocateheap.c
index 0e83c4c63..c334290dd 100644
--- a/nuttx/arch/mips/src/common/up_allocateheap.c
+++ b/nuttx/arch/mips/src/common/up_allocateheap.c
@@ -81,7 +81,7 @@
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
{
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)g_idle_topstack;
*heap_size = CONFIG_RAM_END - g_idle_topstack;
}
diff --git a/nuttx/arch/mips/src/common/up_createstack.c b/nuttx/arch/mips/src/common/up_createstack.c
index e2a73fc7d..7961ef3d9 100644
--- a/nuttx/arch/mips/src/common/up_createstack.c
+++ b/nuttx/arch/mips/src/common/up_createstack.c
@@ -213,7 +213,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
- up_ledon(LED_STACKCREATED);
+ board_led_on(LED_STACKCREATED);
return OK;
}
diff --git a/nuttx/arch/mips/src/common/up_initialize.c b/nuttx/arch/mips/src/common/up_initialize.c
index eb03cf931..a6e3e5577 100644
--- a/nuttx/arch/mips/src/common/up_initialize.c
+++ b/nuttx/arch/mips/src/common/up_initialize.c
@@ -191,5 +191,5 @@ void up_initialize(void)
/* Initialize USB -- device and/or host */
up_usbinitialize();
- up_ledon(LED_IRQSENABLED);
+ board_led_on(LED_IRQSENABLED);
}
diff --git a/nuttx/arch/mips/src/common/up_internal.h b/nuttx/arch/mips/src/common/up_internal.h
index 0e7960c0f..3e9da3e2c 100644
--- a/nuttx/arch/mips/src/common/up_internal.h
+++ b/nuttx/arch/mips/src/common/up_internal.h
@@ -290,12 +290,12 @@ extern void up_usbuninitialize(void);
/* LEDs */
#ifdef CONFIG_ARCH_LEDS
-extern void up_ledon(int led);
-extern void up_ledoff(int led);
+extern void board_led_on(int led);
+extern void board_led_off(int led);
#else
-# define up_ledinit()
-# define up_ledon(led)
-# define up_ledoff(led)
+# define board_led_initialize()
+# define board_led_on(led)
+# define board_led_off(led)
#endif
#endif /* __ASSEMBLY__ */
diff --git a/nuttx/arch/mips/src/mips32/up_assert.c b/nuttx/arch/mips/src/mips32/up_assert.c
index 36414d71c..bd59bbc2c 100644
--- a/nuttx/arch/mips/src/mips32/up_assert.c
+++ b/nuttx/arch/mips/src/mips32/up_assert.c
@@ -101,9 +101,9 @@ static void _up_assert(int errorcode)
for(;;)
{
#ifdef CONFIG_ARCH_LEDS
- up_ledon(LED_PANIC);
+ board_led_on(LED_PANIC);
up_mdelay(250);
- up_ledoff(LED_PANIC);
+ board_led_off(LED_PANIC);
up_mdelay(250);
#endif
}
@@ -128,7 +128,7 @@ void up_assert(const uint8_t *filename, int lineno)
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
#ifdef CONFIG_PRINT_TASKNAME
lldbg("Assertion failed at file:%s line: %d task: %s\n",
diff --git a/nuttx/arch/mips/src/mips32/up_doirq.c b/nuttx/arch/mips/src/mips32/up_doirq.c
index bf1a19727..090fdbae5 100644
--- a/nuttx/arch/mips/src/mips32/up_doirq.c
+++ b/nuttx/arch/mips/src/mips32/up_doirq.c
@@ -72,7 +72,7 @@
uint32_t *up_doirq(int irq, uint32_t *regs)
{
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
#ifdef CONFIG_SUPPRESS_INTERRUPTS
PANIC();
#else
@@ -122,6 +122,6 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
up_enable_irq(irq);
#endif
- up_ledoff(LED_INIRQ);
+ board_led_off(LED_INIRQ);
return regs;
}
diff --git a/nuttx/arch/mips/src/mips32/up_sigdeliver.c b/nuttx/arch/mips/src/mips32/up_sigdeliver.c
index defa6bd10..7ad80f733 100644
--- a/nuttx/arch/mips/src/mips32/up_sigdeliver.c
+++ b/nuttx/arch/mips/src/mips32/up_sigdeliver.c
@@ -93,7 +93,7 @@ void up_sigdeliver(void)
int saved_errno = rtcb->pterrno;
- up_ledon(LED_SIGNAL);
+ board_led_on(LED_SIGNAL);
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
@@ -135,7 +135,7 @@ void up_sigdeliver(void)
* execution.
*/
- up_ledoff(LED_SIGNAL);
+ board_led_off(LED_SIGNAL);
up_fullcontextrestore(regs);
/* up_fullcontextrestore() should not return but could if the software
diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-cvr.h b/nuttx/arch/mips/src/pic32mx/pic32mx-cvr.h
index f41ea89fb..ab865c0a6 100644
--- a/nuttx/arch/mips/src/pic32mx/pic32mx-cvr.h
+++ b/nuttx/arch/mips/src/pic32mx/pic32mx-cvr.h
@@ -1,113 +1,113 @@
-/************************************************************************************
- * arch/mips/src/pic32mx/pic32mx-cvr.h
- *
- * Copyright (C) 2011 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_MIPS_SRC_PIC32MX_PIC32MX_CVR_H
-#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_CVR_H
-
-/************************************************************************************
- * Included Files
- ************************************************************************************/
-
-#include <nuttx/config.h>
-
-#include "chip.h"
-#include "pic32mx-memorymap.h"
-
-/************************************************************************************
- * Pre-Processor Definitions
- ************************************************************************************/
-/* Register Offsets *****************************************************************/
-
-#define PIC32MX_CVR_CON_OFFSET 0x0000 /* Comparator voltage reference control register */
-#define PIC32MX_CVR_CONCLR_OFFSET 0x0004 /* Comparator voltage reference control clear register */
-#define PIC32MX_CVR_CONSET_OFFSET 0x0008 /* Comparator voltage reference control set register */
-#define PIC32MX_CVR_CONINV_OFFSET 0x000c /* Comparator voltage reference control invert register */
-
-/* Register Addresses ***************************************************************/
-
-#define PIC32MX_CVR_CON (PIC32MX_CVR_K1BASE+PIC32MX_CVR_CON_OFFSET)
-#define PIC32MX_CVR_CONCLR (PIC32MX_CVR_K1BASE+PIC32MX_CVR_CONCLR_OFFSET)
-#define PIC32MX_CVR_CONSET (PIC32MX_CVR_K1BASE+PIC32MX_CVR_CONSET_OFFSET)
-#define PIC32MX_CVR_CONINV (PIC32MX_CVR_K1BASE+PIC32MX_CVR_CONINV_OFFSET)
-
-/* Register Bit-Field Definitions ***************************************************/
-
-/* Comparator voltage reference control register */
-
-#define CVR_CON_CVR_SHIFT (0) /* Bits 0-3: CVREF value selection */
-#define CVR_CON_CVR_MASK (15 << CVR_CON_CVR_SHIFT)
-# define CVR_CON_CVR(n) ((n) << CVR_CON_CVR_SHIFT)
-#define CVR_CON_CVRSS (1 << 4) /* Bit 4: CVREF source selection */
-#define CVR_CON_CVRR (1 << 5) /* Bit 5: CVREF range selection */
-#define CVR_CON_CVROE (1 << 6) /* Bit 6: CVREFOUT enable */
-#ifdef CHIP_VRFSEL
-# define CVR_CON_BGSEL_SHIFT (8) /* Bits 8-9: Band gap reference source */
-# define CVR_CON_BGSEL_MASK (3 << CVR_CON_CVR_SHIFT)
-# define CVR_CON_BGSEL_1p2V (0 << CVR_CON_CVR_SHIFT) /* IVREF = 1.2V (nominal) */
-# define CVR_CON_BGSEL_0p6V (1 << CVR_CON_CVR_SHIFT) /* IVREF = 0.6V (nominal) */
-# define CVR_CON_BGSEL_0p2V (2 << CVR_CON_CVR_SHIFT) /* IVREF = 0.2V (nominal) */
-# define CVR_CON_BGSEL_VREF (3 << CVR_CON_CVR_SHIFT) /* VREF = VREF+ */
-# define CVR_CON_VREFSEL (1 << 10) /* Bit 10: Voltage reference select */
-#endif
-#define CVR_CON_ON (1 << 15) /* Bit 15: Comparator voltage reference on */
-
-/************************************************************************************
- * Public Types
- ************************************************************************************/
-
-#ifndef __ASSEMBLY__
-
-/************************************************************************************
- * Inline Functions
- ************************************************************************************/
-
-/************************************************************************************
- * Public Function Prototypes
- ************************************************************************************/
-
-#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
-#endif
-
-#undef EXTERN
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __ASSEMBLY__ */
-#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_CVR_H */
+/************************************************************************************
+ * arch/mips/src/pic32mx/pic32mx-cvr.h
+ *
+ * Copyright (C) 2011 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_MIPS_SRC_PIC32MX_PIC32MX_CVR_H
+#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_CVR_H
+
+/************************************************************************************
+ * Included Files
+ ************************************************************************************/
+
+#include <nuttx/config.h>
+
+#include "chip.h"
+#include "pic32mx-memorymap.h"
+
+/************************************************************************************
+ * Pre-Processor Definitions
+ ************************************************************************************/
+/* Register Offsets *****************************************************************/
+
+#define PIC32MX_CVR_CON_OFFSET 0x0000 /* Comparator voltage reference control register */
+#define PIC32MX_CVR_CONCLR_OFFSET 0x0004 /* Comparator voltage reference control clear register */
+#define PIC32MX_CVR_CONSET_OFFSET 0x0008 /* Comparator voltage reference control set register */
+#define PIC32MX_CVR_CONINV_OFFSET 0x000c /* Comparator voltage reference control invert register */
+
+/* Register Addresses ***************************************************************/
+
+#define PIC32MX_CVR_CON (PIC32MX_CVR_K1BASE+PIC32MX_CVR_CON_OFFSET)
+#define PIC32MX_CVR_CONCLR (PIC32MX_CVR_K1BASE+PIC32MX_CVR_CONCLR_OFFSET)
+#define PIC32MX_CVR_CONSET (PIC32MX_CVR_K1BASE+PIC32MX_CVR_CONSET_OFFSET)
+#define PIC32MX_CVR_CONINV (PIC32MX_CVR_K1BASE+PIC32MX_CVR_CONINV_OFFSET)
+
+/* Register Bit-Field Definitions ***************************************************/
+
+/* Comparator voltage reference control register */
+
+#define CVR_CON_CVR_SHIFT (0) /* Bits 0-3: CVREF value selection */
+#define CVR_CON_CVR_MASK (15 << CVR_CON_CVR_SHIFT)
+# define CVR_CON_CVR(n) ((n) << CVR_CON_CVR_SHIFT)
+#define CVR_CON_CVRSS (1 << 4) /* Bit 4: CVREF source selection */
+#define CVR_CON_CVRR (1 << 5) /* Bit 5: CVREF range selection */
+#define CVR_CON_CVROE (1 << 6) /* Bit 6: CVREFOUT enable */
+#ifdef CHIP_VRFSEL
+# define CVR_CON_BGSEL_SHIFT (8) /* Bits 8-9: Band gap reference source */
+# define CVR_CON_BGSEL_MASK (3 << CVR_CON_CVR_SHIFT)
+# define CVR_CON_BGSEL_1p2V (0 << CVR_CON_CVR_SHIFT) /* IVREF = 1.2V (nominal) */
+# define CVR_CON_BGSEL_0p6V (1 << CVR_CON_CVR_SHIFT) /* IVREF = 0.6V (nominal) */
+# define CVR_CON_BGSEL_0p2V (2 << CVR_CON_CVR_SHIFT) /* IVREF = 0.2V (nominal) */
+# define CVR_CON_BGSEL_VREF (3 << CVR_CON_CVR_SHIFT) /* VREF = VREF+ */
+# define CVR_CON_VREFSEL (1 << 10) /* Bit 10: Voltage reference select */
+#endif
+#define CVR_CON_ON (1 << 15) /* Bit 15: Comparator voltage reference on */
+
+/************************************************************************************
+ * Public Types
+ ************************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/************************************************************************************
+ * Inline Functions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Public Function Prototypes
+ ************************************************************************************/
+
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C" {
+#else
+#define EXTERN extern
+#endif
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ASSEMBLY__ */
+#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_CVR_H */
diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-decodeirq.c b/nuttx/arch/mips/src/pic32mx/pic32mx-decodeirq.c
index 3f5126cfc..3c38610bd 100644
--- a/nuttx/arch/mips/src/pic32mx/pic32mx-decodeirq.c
+++ b/nuttx/arch/mips/src/pic32mx/pic32mx-decodeirq.c
@@ -95,7 +95,7 @@ uint32_t *pic32mx_decodeirq(uint32_t *regs)
* processing an interrupt.
*/
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
/* Save the current value of current_regs (to support nested interrupt
* handling). Then set current_regs to regs, indicating that this is
@@ -161,11 +161,11 @@ uint32_t *pic32mx_decodeirq(uint32_t *regs)
current_regs = savestate;
if (current_regs == NULL)
{
- up_ledoff(LED_INIRQ);
+ board_led_off(LED_INIRQ);
}
#else
current_regs = NULL;
- up_ledoff(LED_INIRQ);
+ board_led_off(LED_INIRQ);
#endif
return regs;
diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-exception.c b/nuttx/arch/mips/src/pic32mx/pic32mx-exception.c
index cf0813e5f..125bbbf88 100644
--- a/nuttx/arch/mips/src/pic32mx/pic32mx-exception.c
+++ b/nuttx/arch/mips/src/pic32mx/pic32mx-exception.c
@@ -94,7 +94,7 @@ uint32_t *pic32mx_exception(uint32_t *regs)
* processing an interrupt.
*/
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
#ifdef CONFIG_DEBUG
/* Get the cause of the exception from the CAUSE register */
diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-ic.h b/nuttx/arch/mips/src/pic32mx/pic32mx-ic.h
index a553f1f71..87703818a 100644
--- a/nuttx/arch/mips/src/pic32mx/pic32mx-ic.h
+++ b/nuttx/arch/mips/src/pic32mx/pic32mx-ic.h
@@ -1,166 +1,166 @@
-/************************************************************************************
- * arch/mips/src/pic32mx/pic32mx-ic.h
- *
- * Copyright (C) 2011 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_MIPS_SRC_PIC32MX_PIC32MX_IC_H
-#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_IC_H
-
-/************************************************************************************
- * Included Files
- ************************************************************************************/
-
-#include <nuttx/config.h>
-
-#include "chip.h"
-#include "pic32mx-memorymap.h"
-
-#if CHIP_NIC > 0
-
-/************************************************************************************
- * Pre-Processor Definitions
- ************************************************************************************/
-/* Register Offsets *****************************************************************/
-
-#define PIC32MX_IC_CON_OFFSET 0x0000 /* Input Capture X Control Register */
-#define PIC32MX_IC_CONCLR_OFFSET 0x0004 /* Input Capture X Control Set Register */
-#define PIC32MX_IC_CONSET_OFFSET 0x0008 /* Input Capture X Control Clear Register */
-#define PIC32MX_IC_CONINV_OFFSET 0x000c /* Input Capture X Control Invert Register */
-#define PIC32MX_IC_BUF_OFFSET 0x0010 /* Input Capture X Buffer Register */
-
-/* Register Addresses ***************************************************************/
-
-#define PIC32MX_IC_CON(n) (PIC32MX_IC_K1BASE(n)+PIC32MX_IC_CON_OFFSET)
-#define PIC32MX_IC_CONCLR(n) (PIC32MX_IC_K1BASE(n)+PIC32MX_IC_CONCLR_OFFSET)
-#define PIC32MX_IC_CONSET(n) (PIC32MX_IC_K1BASE(n)+PIC32MX_IC_CONSET_OFFSET)
-#define PIC32MX_IC_CONINV(n) (PIC32MX_IC_K1BASE(n)+PIC32MX_IC_CONINV_OFFSET)
-#define PIC32MX_IC_BUF(n) (PIC32MX_IC_K1BASE(n)+PIC32MX_IC_BUF_OFFSET)
-
-#define PIC32MX_IC1_CON (PIC32MX_IC1_K1BASE+PIC32MX_IC_CON_OFFSET)
-#define PIC32MX_IC1_CONCLR (PIC32MX_IC1_K1BASE+PIC32MX_IC_CONCLR_OFFSET)
-#define PIC32MX_IC1_CONSET (PIC32MX_IC1_K1BASE+PIC32MX_IC_CONSET_OFFSET)
-#define PIC32MX_IC1_CONINV (PIC32MX_IC1_K1BASE+PIC32MX_IC_CONINV_OFFSET)
-#define PIC32MX_IC1_BUF (PIC32MX_IC1_K1BASE+PIC32MX_IC_BUF_OFFSET)
-
-#if CHIP_NIC > 1
-# define PIC32MX_IC2_CON (PIC32MX_IC2_K1BASE+PIC32MX_IC_CON_OFFSET)
-# define PIC32MX_IC2_CONCLR (PIC32MX_IC2_K1BASE+PIC32MX_IC_CONCLR_OFFSET)
-# define PIC32MX_IC2_CONSET (PIC32MX_IC2_K1BASE+PIC32MX_IC_CONSET_OFFSET)
-# define PIC32MX_IC2_CONINV (PIC32MX_IC2_K1BASE+PIC32MX_IC_CONINV_OFFSET)
-# define PIC32MX_IC2_BUF (PIC32MX_IC2_K1BASE+PIC32MX_IC_BUF_OFFSET)
-#endif
-
-#if CHIP_NIC > 2
-# define PIC32MX_IC3_CON (PIC32MX_IC3_K1BASE+PIC32MX_IC_CON_OFFSET)
-# define PIC32MX_IC3_CONCLR (PIC32MX_IC3_K1BASE+PIC32MX_IC_CONCLR_OFFSET)
-# define PIC32MX_IC3_CONSET (PIC32MX_IC3_K1BASE+PIC32MX_IC_CONSET_OFFSET)
-# define PIC32MX_IC3_CONINV (PIC32MX_IC3_K1BASE+PIC32MX_IC_CONINV_OFFSET)
-# define PIC32MX_IC3_BUF (PIC32MX_IC3_K1BASE+PIC32MX_IC_BUF_OFFSET)
-#endif
-
-#if CHIP_NIC > 3
-# define PIC32MX_IC4_CON (PIC32MX_IC4_K1BASE+PIC32MX_IC_CON_OFFSET)
-# define PIC32MX_IC4_CONCLR (PIC32MX_IC4_K1BASE+PIC32MX_IC_CONCLR_OFFSET)
-# define PIC32MX_IC4_CONSET (PIC32MX_IC4_K1BASE+PIC32MX_IC_CONSET_OFFSET)
-# define PIC32MX_IC4_CONINV (PIC32MX_IC4_K1BASE+PIC32MX_IC_CONINV_OFFSET)
-# define PIC32MX_IC4_BUF (PIC32MX_IC4_K1BASE+PIC32MX_IC_BUF_OFFSET)
-#endif
-
-#if CHIP_NIC > 4
-# define PIC32MX_IC5_CON (PIC32MX_IC5_K1BASE+PIC32MX_IC_CON_OFFSET)
-# define PIC32MX_IC5_CONCLR (PIC32MX_IC5_K1BASE+PIC32MX_IC_CONCLR_OFFSET)
-# define PIC32MX_IC5_CONSET (PIC32MX_IC5_K1BASE+PIC32MX_IC_CONSET_OFFSET)
-# define PIC32MX_IC5_CONINV (PIC32MX_IC5_K1BASE+PIC32MX_IC_CONINV_OFFSET)
-# define PIC32MX_IC5_BUF (PIC32MX_IC5_K1BASE+PIC32MX_IC_BUF_OFFSET)
-#endif
-
-/* Register Bit-Field Definitions ***************************************************/
-
-/* Input Capture X Control Register */
-
-#define IC_CON_ICM_SHIFT (0) /* Bits 0-2: Input Capture Mode Select */
-#define IC_CON_ICM_MASK (7 << IC_CON_ICM_SHIFT)
-# define IC_CON_ICM_DISABLE (0 << IC_CON_ICM_SHIFT) /* Capture disable mode */
-# define IC_CON_ICM_EDGE (1 << IC_CON_ICM_SHIFT) /* Edge detect mode */
-# define IC_CON_ICM_FALLING (2 << IC_CON_ICM_SHIFT) /* Every falling edge */
-# define IC_CON_ICM_RISING (3 << IC_CON_ICM_SHIFT) /* Every rising edge */
-# define IC_CON_ICM_4th (4 << IC_CON_ICM_SHIFT) /* Every fourth rising edge */
-# define IC_CON_ICM_16th (5 << IC_CON_ICM_SHIFT) /* Every sixteenth rising edge */
-# define IC_CON_ICM_TRIGGER (6 << IC_CON_ICM_SHIFT) /* Specified edge first and every edge thereafter */
-# define IC_CON_ICM_INTERRUPT (7 << IC_CON_ICM_SHIFT) /* Interrupt-only mode */
-#define IC_CON_ICBNE (1 << 3) /* Bit 3: Input Capture Buffer Not Empty Status */
-#define IC_CON_ICOV (1 << 4) /* Bit 4: Input Capture */
-#define IC_CON_ICI_SHIFT (5) /* Bits 5-6: Interrupt Control */
-#define IC_CON_ICI_MASK (3 << IC_CON_ICI_SHIFT)
-# define IC_CON_ICI_EVERY (0 << IC_CON_ICI_SHIFT) /* Interrupt every capture event */
-# define IC_CON_ICI_2ND (1 << IC_CON_ICI_SHIFT) /* Interrupt every 2nd capture event */
-# define IC_CON_ICI_3RD (2 << IC_CON_ICI_SHIFT) /* Interrupt every 3rd capture event */
-# define IC_CON_ICI_4TH (3 << IC_CON_ICI_SHIFT) /* Interrupt every 4th capture event */
-#define IC_CON_ICTMR (1 << 7) /* Bit 7: Timer Select */
-#define IC_CON_C32 (1 << 8) /* Bit 8: 32-bit Capture Select */
-#define IC_CON_FEDGE (1 << 9) /* Bit 9: First Capture Edge Select */
-#define IC_CON_SIDL (1 << 13) /* Bit 13: Stop in Idle Control */
-#define IC_CON_FRZ (1 << 14) /* Bit 14: Freeze in Debug Mode Control */
-#define IC_CON_ON (1 << 15) /* Bit 15: Input Capture Module Enable */
-
-/* Input Capture X Buffer Register -- 32-bit capture value */
-
-/************************************************************************************
- * Public Types
- ************************************************************************************/
-
-#ifndef __ASSEMBLY__
-
-/************************************************************************************
- * Inline Functions
- ************************************************************************************/
-
-/************************************************************************************
- * Public Function Prototypes
- ************************************************************************************/
-
-#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
-#endif
-
-#undef EXTERN
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __ASSEMBLY__ */
-#endif /* CHIP_NIC > 0 */
-#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_IC_H */
+/************************************************************************************
+ * arch/mips/src/pic32mx/pic32mx-ic.h
+ *
+ * Copyright (C) 2011 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_MIPS_SRC_PIC32MX_PIC32MX_IC_H
+#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_IC_H
+
+/************************************************************************************
+ * Included Files
+ ************************************************************************************/
+
+#include <nuttx/config.h>
+
+#include "chip.h"
+#include "pic32mx-memorymap.h"
+
+#if CHIP_NIC > 0
+
+/************************************************************************************
+ * Pre-Processor Definitions
+ ************************************************************************************/
+/* Register Offsets *****************************************************************/
+
+#define PIC32MX_IC_CON_OFFSET 0x0000 /* Input Capture X Control Register */
+#define PIC32MX_IC_CONCLR_OFFSET 0x0004 /* Input Capture X Control Set Register */
+#define PIC32MX_IC_CONSET_OFFSET 0x0008 /* Input Capture X Control Clear Register */
+#define PIC32MX_IC_CONINV_OFFSET 0x000c /* Input Capture X Control Invert Register */
+#define PIC32MX_IC_BUF_OFFSET 0x0010 /* Input Capture X Buffer Register */
+
+/* Register Addresses ***************************************************************/
+
+#define PIC32MX_IC_CON(n) (PIC32MX_IC_K1BASE(n)+PIC32MX_IC_CON_OFFSET)
+#define PIC32MX_IC_CONCLR(n) (PIC32MX_IC_K1BASE(n)+PIC32MX_IC_CONCLR_OFFSET)
+#define PIC32MX_IC_CONSET(n) (PIC32MX_IC_K1BASE(n)+PIC32MX_IC_CONSET_OFFSET)
+#define PIC32MX_IC_CONINV(n) (PIC32MX_IC_K1BASE(n)+PIC32MX_IC_CONINV_OFFSET)
+#define PIC32MX_IC_BUF(n) (PIC32MX_IC_K1BASE(n)+PIC32MX_IC_BUF_OFFSET)
+
+#define PIC32MX_IC1_CON (PIC32MX_IC1_K1BASE+PIC32MX_IC_CON_OFFSET)
+#define PIC32MX_IC1_CONCLR (PIC32MX_IC1_K1BASE+PIC32MX_IC_CONCLR_OFFSET)
+#define PIC32MX_IC1_CONSET (PIC32MX_IC1_K1BASE+PIC32MX_IC_CONSET_OFFSET)
+#define PIC32MX_IC1_CONINV (PIC32MX_IC1_K1BASE+PIC32MX_IC_CONINV_OFFSET)
+#define PIC32MX_IC1_BUF (PIC32MX_IC1_K1BASE+PIC32MX_IC_BUF_OFFSET)
+
+#if CHIP_NIC > 1
+# define PIC32MX_IC2_CON (PIC32MX_IC2_K1BASE+PIC32MX_IC_CON_OFFSET)
+# define PIC32MX_IC2_CONCLR (PIC32MX_IC2_K1BASE+PIC32MX_IC_CONCLR_OFFSET)
+# define PIC32MX_IC2_CONSET (PIC32MX_IC2_K1BASE+PIC32MX_IC_CONSET_OFFSET)
+# define PIC32MX_IC2_CONINV (PIC32MX_IC2_K1BASE+PIC32MX_IC_CONINV_OFFSET)
+# define PIC32MX_IC2_BUF (PIC32MX_IC2_K1BASE+PIC32MX_IC_BUF_OFFSET)
+#endif
+
+#if CHIP_NIC > 2
+# define PIC32MX_IC3_CON (PIC32MX_IC3_K1BASE+PIC32MX_IC_CON_OFFSET)
+# define PIC32MX_IC3_CONCLR (PIC32MX_IC3_K1BASE+PIC32MX_IC_CONCLR_OFFSET)
+# define PIC32MX_IC3_CONSET (PIC32MX_IC3_K1BASE+PIC32MX_IC_CONSET_OFFSET)
+# define PIC32MX_IC3_CONINV (PIC32MX_IC3_K1BASE+PIC32MX_IC_CONINV_OFFSET)
+# define PIC32MX_IC3_BUF (PIC32MX_IC3_K1BASE+PIC32MX_IC_BUF_OFFSET)
+#endif
+
+#if CHIP_NIC > 3
+# define PIC32MX_IC4_CON (PIC32MX_IC4_K1BASE+PIC32MX_IC_CON_OFFSET)
+# define PIC32MX_IC4_CONCLR (PIC32MX_IC4_K1BASE+PIC32MX_IC_CONCLR_OFFSET)
+# define PIC32MX_IC4_CONSET (PIC32MX_IC4_K1BASE+PIC32MX_IC_CONSET_OFFSET)
+# define PIC32MX_IC4_CONINV (PIC32MX_IC4_K1BASE+PIC32MX_IC_CONINV_OFFSET)
+# define PIC32MX_IC4_BUF (PIC32MX_IC4_K1BASE+PIC32MX_IC_BUF_OFFSET)
+#endif
+
+#if CHIP_NIC > 4
+# define PIC32MX_IC5_CON (PIC32MX_IC5_K1BASE+PIC32MX_IC_CON_OFFSET)
+# define PIC32MX_IC5_CONCLR (PIC32MX_IC5_K1BASE+PIC32MX_IC_CONCLR_OFFSET)
+# define PIC32MX_IC5_CONSET (PIC32MX_IC5_K1BASE+PIC32MX_IC_CONSET_OFFSET)
+# define PIC32MX_IC5_CONINV (PIC32MX_IC5_K1BASE+PIC32MX_IC_CONINV_OFFSET)
+# define PIC32MX_IC5_BUF (PIC32MX_IC5_K1BASE+PIC32MX_IC_BUF_OFFSET)
+#endif
+
+/* Register Bit-Field Definitions ***************************************************/
+
+/* Input Capture X Control Register */
+
+#define IC_CON_ICM_SHIFT (0) /* Bits 0-2: Input Capture Mode Select */
+#define IC_CON_ICM_MASK (7 << IC_CON_ICM_SHIFT)
+# define IC_CON_ICM_DISABLE (0 << IC_CON_ICM_SHIFT) /* Capture disable mode */
+# define IC_CON_ICM_EDGE (1 << IC_CON_ICM_SHIFT) /* Edge detect mode */
+# define IC_CON_ICM_FALLING (2 << IC_CON_ICM_SHIFT) /* Every falling edge */
+# define IC_CON_ICM_RISING (3 << IC_CON_ICM_SHIFT) /* Every rising edge */
+# define IC_CON_ICM_4th (4 << IC_CON_ICM_SHIFT) /* Every fourth rising edge */
+# define IC_CON_ICM_16th (5 << IC_CON_ICM_SHIFT) /* Every sixteenth rising edge */
+# define IC_CON_ICM_TRIGGER (6 << IC_CON_ICM_SHIFT) /* Specified edge first and every edge thereafter */
+# define IC_CON_ICM_INTERRUPT (7 << IC_CON_ICM_SHIFT) /* Interrupt-only mode */
+#define IC_CON_ICBNE (1 << 3) /* Bit 3: Input Capture Buffer Not Empty Status */
+#define IC_CON_ICOV (1 << 4) /* Bit 4: Input Capture */
+#define IC_CON_ICI_SHIFT (5) /* Bits 5-6: Interrupt Control */
+#define IC_CON_ICI_MASK (3 << IC_CON_ICI_SHIFT)
+# define IC_CON_ICI_EVERY (0 << IC_CON_ICI_SHIFT) /* Interrupt every capture event */
+# define IC_CON_ICI_2ND (1 << IC_CON_ICI_SHIFT) /* Interrupt every 2nd capture event */
+# define IC_CON_ICI_3RD (2 << IC_CON_ICI_SHIFT) /* Interrupt every 3rd capture event */
+# define IC_CON_ICI_4TH (3 << IC_CON_ICI_SHIFT) /* Interrupt every 4th capture event */
+#define IC_CON_ICTMR (1 << 7) /* Bit 7: Timer Select */
+#define IC_CON_C32 (1 << 8) /* Bit 8: 32-bit Capture Select */
+#define IC_CON_FEDGE (1 << 9) /* Bit 9: First Capture Edge Select */
+#define IC_CON_SIDL (1 << 13) /* Bit 13: Stop in Idle Control */
+#define IC_CON_FRZ (1 << 14) /* Bit 14: Freeze in Debug Mode Control */
+#define IC_CON_ON (1 << 15) /* Bit 15: Input Capture Module Enable */
+
+/* Input Capture X Buffer Register -- 32-bit capture value */
+
+/************************************************************************************
+ * Public Types
+ ************************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/************************************************************************************
+ * Inline Functions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Public Function Prototypes
+ ************************************************************************************/
+
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C" {
+#else
+#define EXTERN extern
+#endif
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ASSEMBLY__ */
+#endif /* CHIP_NIC > 0 */
+#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_IC_H */
diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-oc.h b/nuttx/arch/mips/src/pic32mx/pic32mx-oc.h
index 488970533..dc3486295 100644
--- a/nuttx/arch/mips/src/pic32mx/pic32mx-oc.h
+++ b/nuttx/arch/mips/src/pic32mx/pic32mx-oc.h
@@ -1,211 +1,211 @@
-/************************************************************************************
- * arch/mips/src/pic32mx/pic32mx-oc.h
- *
- * Copyright (C) 2011 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_MIPS_SRC_PIC32MX_PIC32MX_OC_H
-#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_OC_H
-
-/************************************************************************************
- * Included Files
- ************************************************************************************/
-
-#include <nuttx/config.h>
-
-#include "chip.h"
-#include "pic32mx-memorymap.h"
-
-#if CHIP_NOC > 0
-
-/************************************************************************************
- * Pre-Processor Definitions
- ************************************************************************************/
-/* Register Offsets *****************************************************************/
-
-#define PIC32MX_OC_CON_OFFSET 0x0000 /* Output compare control register */
-#define PIC32MX_OC_CONCLR_OFFSET 0x0004 /* Output compare control clear register */
-#define PIC32MX_OC_CONSET_OFFSET 0x0008 /* Output compare control set register */
-#define PIC32MX_OC_CONINV_OFFSET 0x000c /* Output compare control invert register */
-#define PIC32MX_OC_R_OFFSET 0x0010 /* Output compare data register */
-#define PIC32MX_OC_RCLR_OFFSET 0x0014 /* Output compare data clear register */
-#define PIC32MX_OC_RSET_OFFSET 0x0018 /* Output compare data set register */
-#define PIC32MX_OC_RINV_OFFSET 0x001c /* Output compare data invert register */
-#define PIC32MX_OC_RS_OFFSET 0x0020 /* Output compare secondary data register */
-#define PIC32MX_OC_RSCLR_OFFSET 0x0024 /* Output compare secondary data clear register */
-#define PIC32MX_OC_RSSET_OFFSET 0x0028 /* Output compare secondary data set register */
-#define PIC32MX_OC_RSINV_OFFSET 0x002c /* Output compare secondary data invert register */
-
-/* See also TIMER2 and TIMER3 registers */
-
-/* Register Addresses ***************************************************************/
-
-#define PIC32MX_OC_CON(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_CON_OFFSET)
-#define PIC32MX_OC_CONCLR(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_CONCLR_OFFSET)
-#define PIC32MX_OC_CONSET(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_CONSET_OFFSET)
-#define PIC32MX_OC_CONINV(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_CONINV_OFFSET)
-#define PIC32MX_OC_R(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_R_OFFSET)
-#define PIC32MX_OC_RCLR(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_RCLR_OFFSET)
-#define PIC32MX_OC_RSET(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_RSET_OFFSET)
-#define PIC32MX_OC_RINV(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_RINV_OFFSET)
-#define PIC32MX_OC_RS(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_RS_OFFSET)
-#define PIC32MX_OC_RSCLR(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_RSCLR_OFFSET)
-#define PIC32MX_OC_RSSET(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_RSSET_OFFSET)
-#define PIC32MX_OC_RSINV(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_RSINV_OFFSET)
-
-#define PIC32MX_OC1_CON (PIC32MX_OC1_K1BASE+PIC32MX_OC_CON_OFFSET)
-#define PIC32MX_OC1_CONCLR (PIC32MX_OC1_K1BASE+PIC32MX_OC_CONCLR_OFFSET)
-#define PIC32MX_OC1_CONSET (PIC32MX_OC1_K1BASE+PIC32MX_OC_CONSET_OFFSET)
-#define PIC32MX_OC1_CONINV (PIC32MX_OC1_K1BASE+PIC32MX_OC_CONINV_OFFSET)
-#define PIC32MX_OC1_R (PIC32MX_OC1_K1BASE+PIC32MX_OC_R_OFFSET)
-#define PIC32MX_OC1_RCLR (PIC32MX_OC1_K1BASE+PIC32MX_OC_RCLR_OFFSET)
-#define PIC32MX_OC1_RSET (PIC32MX_OC1_K1BASE+PIC32MX_OC_RSET_OFFSET)
-#define PIC32MX_OC1_RINV (PIC32MX_OC1_K1BASE+PIC32MX_OC_RINV_OFFSET)
-#define PIC32MX_OC1_RS (PIC32MX_OC1_K1BASE+PIC32MX_OC_RS_OFFSET)
-#define PIC32MX_OC1_RSCLR (PIC32MX_OC1_K1BASE+PIC32MX_OC_RSCLR_OFFSET)
-#define PIC32MX_OC1_RSSET (PIC32MX_OC1_K1BASE+PIC32MX_OC_RSSET_OFFSET)
-#define PIC32MX_OC1_RSINV (PIC32MX_OC1_K1BASE+PIC32MX_OC_RSINV_OFFSET)
-
-#if CHIP_NOC > 1
-# define PIC32MX_OC2_CON (PIC32MX_OC2_K1BASE+PIC32MX_OC_CON_OFFSET)
-# define PIC32MX_OC2_CONCLR (PIC32MX_OC2_K1BASE+PIC32MX_OC_CONCLR_OFFSET)
-# define PIC32MX_OC2_CONSET (PIC32MX_OC2_K1BASE+PIC32MX_OC_CONSET_OFFSET)
-# define PIC32MX_OC2_CONINV (PIC32MX_OC2_K1BASE+PIC32MX_OC_CONINV_OFFSET)
-# define PIC32MX_OC2_R (PIC32MX_OC2_K1BASE+PIC32MX_OC_R_OFFSET)
-# define PIC32MX_OC2_RCLR (PIC32MX_OC2_K1BASE+PIC32MX_OC_RCLR_OFFSET)
-# define PIC32MX_OC2_RSET (PIC32MX_OC2_K1BASE+PIC32MX_OC_RSET_OFFSET)
-# define PIC32MX_OC2_RINV (PIC32MX_OC2_K1BASE+PIC32MX_OC_RINV_OFFSET)
-# define PIC32MX_OC2_RS (PIC32MX_OC2_K1BASE+PIC32MX_OC_RS_OFFSET)
-# define PIC32MX_OC2_RSCLR (PIC32MX_OC2_K1BASE+PIC32MX_OC_RSCLR_OFFSET)
-# define PIC32MX_OC2_RSSET (PIC32MX_OC2_K1BASE+PIC32MX_OC_RSSET_OFFSET)
-# define PIC32MX_OC2_RSINV (PIC32MX_OC2_K1BASE+PIC32MX_OC_RSINV_OFFSET)
-#endif
-
-#if CHIP_NOC > 2
-# define PIC32MX_OC3_CON (PIC32MX_OC3_K1BASE+PIC32MX_OC_CON_OFFSET)
-# define PIC32MX_OC3_CONCLR (PIC32MX_OC3_K1BASE+PIC32MX_OC_CONCLR_OFFSET)
-# define PIC32MX_OC3_CONSET (PIC32MX_OC3_K1BASE+PIC32MX_OC_CONSET_OFFSET)
-# define PIC32MX_OC3_CONINV (PIC32MX_OC3_K1BASE+PIC32MX_OC_CONINV_OFFSET)
-# define PIC32MX_OC3_R (PIC32MX_OC3_K1BASE+PIC32MX_OC_R_OFFSET)
-# define PIC32MX_OC3_RCLR (PIC32MX_OC3_K1BASE+PIC32MX_OC_RCLR_OFFSET)
-# define PIC32MX_OC3_RSET (PIC32MX_OC3_K1BASE+PIC32MX_OC_RSET_OFFSET)
-# define PIC32MX_OC3_RINV (PIC32MX_OC3_K1BASE+PIC32MX_OC_RINV_OFFSET)
-# define PIC32MX_OC3_RS (PIC32MX_OC3_K1BASE+PIC32MX_OC_RS_OFFSET)
-# define PIC32MX_OC3_RSCLR (PIC32MX_OC3_K1BASE+PIC32MX_OC_RSCLR_OFFSET)
-# define PIC32MX_OC3_RSSET (PIC32MX_OC3_K1BASE+PIC32MX_OC_RSSET_OFFSET)
-# define PIC32MX_OC3_RSINV (PIC32MX_OC3_K1BASE+PIC32MX_OC_RSINV_OFFSET)
-#endif
-
-#if CHIP_NOC > 3
-# define PIC32MX_OC4_CON (PIC32MX_OC4_K1BASE+PIC32MX_OC_CON_OFFSET)
-# define PIC32MX_OC4_CONCLR (PIC32MX_OC4_K1BASE+PIC32MX_OC_CONCLR_OFFSET)
-# define PIC32MX_OC4_CONSET (PIC32MX_OC4_K1BASE+PIC32MX_OC_CONSET_OFFSET)
-# define PIC32MX_OC4_CONINV (PIC32MX_OC4_K1BASE+PIC32MX_OC_CONINV_OFFSET)
-# define PIC32MX_OC4_R (PIC32MX_OC4_K1BASE+PIC32MX_OC_R_OFFSET)
-# define PIC32MX_OC4_RCLR (PIC32MX_OC4_K1BASE+PIC32MX_OC_RCLR_OFFSET)
-# define PIC32MX_OC4_RSET (PIC32MX_OC4_K1BASE+PIC32MX_OC_RSET_OFFSET)
-# define PIC32MX_OC4_RINV (PIC32MX_OC4_K1BASE+PIC32MX_OC_RINV_OFFSET)
-# define PIC32MX_OC4_RS (PIC32MX_OC4_K1BASE+PIC32MX_OC_RS_OFFSET)
-# define PIC32MX_OC4_RSCLR (PIC32MX_OC4_K1BASE+PIC32MX_OC_RSCLR_OFFSET)
-# define PIC32MX_OC4_RSSET (PIC32MX_OC4_K1BASE+PIC32MX_OC_RSSET_OFFSET)
-# define PIC32MX_OC4_RSINV (PIC32MX_OC4_K1BASE+PIC32MX_OC_RSINV_OFFSET)
-#endif
-
-#if CHIP_NOC > 4
-# define PIC32MX_OC5_CON (PIC32MX_OC5_K1BASE+PIC32MX_OC_CON_OFFSET)
-# define PIC32MX_OC5_CONCLR (PIC32MX_OC5_K1BASE+PIC32MX_OC_CONCLR_OFFSET)
-# define PIC32MX_OC5_CONSET (PIC32MX_OC5_K1BASE+PIC32MX_OC_CONSET_OFFSET)
-# define PIC32MX_OC5_CONINV (PIC32MX_OC5_K1BASE+PIC32MX_OC_CONINV_OFFSET)
-# define PIC32MX_OC5_R (PIC32MX_OC5_K1BASE+PIC32MX_OC_R_OFFSET)
-# define PIC32MX_OC5_RCLR (PIC32MX_OC5_K1BASE+PIC32MX_OC_RCLR_OFFSET)
-# define PIC32MX_OC5_RSET (PIC32MX_OC5_K1BASE+PIC32MX_OC_RSET_OFFSET)
-# define PIC32MX_OC5_RINV (PIC32MX_OC5_K1BASE+PIC32MX_OC_RINV_OFFSET)
-# define PIC32MX_OC5_RS (PIC32MX_OC5_K1BASE+PIC32MX_OC_RS_OFFSET)
-# define PIC32MX_OC5_RSCLR (PIC32MX_OC5_K1BASE+PIC32MX_OC_RSCLR_OFFSET)
-# define PIC32MX_OC5_RSSET (PIC32MX_OC5_K1BASE+PIC32MX_OC_RSSET_OFFSET)
-# define PIC32MX_OC5_RSINV (PIC32MX_OC5_K1BASE+PIC32MX_OC_RSINV_OFFSET)
-#endif
-
-/* Register Bit-Field Definitions ***************************************************/
-
-/* Output compare control register */
-
-#define OC_CON_OCM_SHIFT (0) /* Bits 0-2: Output compare mode select */
-#define OC_CON_OCM_MASK (7 << OC_CON_OCM_SHIFT)
-# define OC_CON_OCM_DISABLE (0 << OC_CON_OCM_SHIFT) /* Output compare peripheral disabled */
-# define OC_CON_OCM_LOW2HI (1 << OC_CON_OCM_SHIFT) /* OCx low; compare forces high */
-# define OC_CON_OCM_HITOLOW (2 << OC_CON_OCM_SHIFT) /* OCx high; compare forces low */
-# define OC_CON_OCM_TOGGLE (3 << OC_CON_OCM_SHIFT) /* Compare event toggles OCx */
-# define OC_CON_OCM_LOWPULSE (4 << OC_CON_OCM_SHIFT) /* OCx low; output pulse on OCx*/
-# define OC_CON_OCM_HIPULSE (5 << OC_CON_OCM_SHIFT) /* OCx high; output pulse on OCx */
-# define OC_CON_OCM_PWM (6 << OC_CON_OCM_SHIFT) /* PWM mode on OCx; fault disabled */
-# define OC_CON_OCM_PWMFAULT (7 << OC_CON_OCM_SHIFT) /* PWM mode on OCx; fault enabled */
-#define OC_CON_OCTSEL (1 << 3) /* Bit 3: Output compare timer select */
-#define OC_CON_OCFLT (1 << 4) /* Bit 4: PWM fault condition status */
-#define OC_CON_OC32 (1 << 5) /* Bit 5: 32-bit compare more */
-#define OC_CON_SIDL (1 << 13) /* Bit 13: Stop in idle mode */
-#define OC_CON_FRZ (1 << 14) /* Bit 14: Freeze in debug exception mode */
-#define OC_CON_ON (1 << 15) /* Bit 15: Output compare periperal on */
-
-/* Output compare data register -- 32-bit data register */
-
-/* Output compare secondary data register -- 32-bit data register */
-
-/************************************************************************************
- * Public Types
- ************************************************************************************/
-
-#ifndef __ASSEMBLY__
-
-/************************************************************************************
- * Inline Functions
- ************************************************************************************/
-
-/************************************************************************************
- * Public Function Prototypes
- ************************************************************************************/
-
-#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
-#endif
-
-#undef EXTERN
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __ASSEMBLY__ */
-#endif /* CHIP_NOC > 0 */
-#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_OC_H */
+/************************************************************************************
+ * arch/mips/src/pic32mx/pic32mx-oc.h
+ *
+ * Copyright (C) 2011 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_MIPS_SRC_PIC32MX_PIC32MX_OC_H
+#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_OC_H
+
+/************************************************************************************
+ * Included Files
+ ************************************************************************************/
+
+#include <nuttx/config.h>
+
+#include "chip.h"
+#include "pic32mx-memorymap.h"
+
+#if CHIP_NOC > 0
+
+/************************************************************************************
+ * Pre-Processor Definitions
+ ************************************************************************************/
+/* Register Offsets *****************************************************************/
+
+#define PIC32MX_OC_CON_OFFSET 0x0000 /* Output compare control register */
+#define PIC32MX_OC_CONCLR_OFFSET 0x0004 /* Output compare control clear register */
+#define PIC32MX_OC_CONSET_OFFSET 0x0008 /* Output compare control set register */
+#define PIC32MX_OC_CONINV_OFFSET 0x000c /* Output compare control invert register */
+#define PIC32MX_OC_R_OFFSET 0x0010 /* Output compare data register */
+#define PIC32MX_OC_RCLR_OFFSET 0x0014 /* Output compare data clear register */
+#define PIC32MX_OC_RSET_OFFSET 0x0018 /* Output compare data set register */
+#define PIC32MX_OC_RINV_OFFSET 0x001c /* Output compare data invert register */
+#define PIC32MX_OC_RS_OFFSET 0x0020 /* Output compare secondary data register */
+#define PIC32MX_OC_RSCLR_OFFSET 0x0024 /* Output compare secondary data clear register */
+#define PIC32MX_OC_RSSET_OFFSET 0x0028 /* Output compare secondary data set register */
+#define PIC32MX_OC_RSINV_OFFSET 0x002c /* Output compare secondary data invert register */
+
+/* See also TIMER2 and TIMER3 registers */
+
+/* Register Addresses ***************************************************************/
+
+#define PIC32MX_OC_CON(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_CON_OFFSET)
+#define PIC32MX_OC_CONCLR(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_CONCLR_OFFSET)
+#define PIC32MX_OC_CONSET(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_CONSET_OFFSET)
+#define PIC32MX_OC_CONINV(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_CONINV_OFFSET)
+#define PIC32MX_OC_R(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_R_OFFSET)
+#define PIC32MX_OC_RCLR(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_RCLR_OFFSET)
+#define PIC32MX_OC_RSET(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_RSET_OFFSET)
+#define PIC32MX_OC_RINV(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_RINV_OFFSET)
+#define PIC32MX_OC_RS(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_RS_OFFSET)
+#define PIC32MX_OC_RSCLR(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_RSCLR_OFFSET)
+#define PIC32MX_OC_RSSET(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_RSSET_OFFSET)
+#define PIC32MX_OC_RSINV(n) (PIC32MX_OC_K1BASE(n)+PIC32MX_OC_RSINV_OFFSET)
+
+#define PIC32MX_OC1_CON (PIC32MX_OC1_K1BASE+PIC32MX_OC_CON_OFFSET)
+#define PIC32MX_OC1_CONCLR (PIC32MX_OC1_K1BASE+PIC32MX_OC_CONCLR_OFFSET)
+#define PIC32MX_OC1_CONSET (PIC32MX_OC1_K1BASE+PIC32MX_OC_CONSET_OFFSET)
+#define PIC32MX_OC1_CONINV (PIC32MX_OC1_K1BASE+PIC32MX_OC_CONINV_OFFSET)
+#define PIC32MX_OC1_R (PIC32MX_OC1_K1BASE+PIC32MX_OC_R_OFFSET)
+#define PIC32MX_OC1_RCLR (PIC32MX_OC1_K1BASE+PIC32MX_OC_RCLR_OFFSET)
+#define PIC32MX_OC1_RSET (PIC32MX_OC1_K1BASE+PIC32MX_OC_RSET_OFFSET)
+#define PIC32MX_OC1_RINV (PIC32MX_OC1_K1BASE+PIC32MX_OC_RINV_OFFSET)
+#define PIC32MX_OC1_RS (PIC32MX_OC1_K1BASE+PIC32MX_OC_RS_OFFSET)
+#define PIC32MX_OC1_RSCLR (PIC32MX_OC1_K1BASE+PIC32MX_OC_RSCLR_OFFSET)
+#define PIC32MX_OC1_RSSET (PIC32MX_OC1_K1BASE+PIC32MX_OC_RSSET_OFFSET)
+#define PIC32MX_OC1_RSINV (PIC32MX_OC1_K1BASE+PIC32MX_OC_RSINV_OFFSET)
+
+#if CHIP_NOC > 1
+# define PIC32MX_OC2_CON (PIC32MX_OC2_K1BASE+PIC32MX_OC_CON_OFFSET)
+# define PIC32MX_OC2_CONCLR (PIC32MX_OC2_K1BASE+PIC32MX_OC_CONCLR_OFFSET)
+# define PIC32MX_OC2_CONSET (PIC32MX_OC2_K1BASE+PIC32MX_OC_CONSET_OFFSET)
+# define PIC32MX_OC2_CONINV (PIC32MX_OC2_K1BASE+PIC32MX_OC_CONINV_OFFSET)
+# define PIC32MX_OC2_R (PIC32MX_OC2_K1BASE+PIC32MX_OC_R_OFFSET)
+# define PIC32MX_OC2_RCLR (PIC32MX_OC2_K1BASE+PIC32MX_OC_RCLR_OFFSET)
+# define PIC32MX_OC2_RSET (PIC32MX_OC2_K1BASE+PIC32MX_OC_RSET_OFFSET)
+# define PIC32MX_OC2_RINV (PIC32MX_OC2_K1BASE+PIC32MX_OC_RINV_OFFSET)
+# define PIC32MX_OC2_RS (PIC32MX_OC2_K1BASE+PIC32MX_OC_RS_OFFSET)
+# define PIC32MX_OC2_RSCLR (PIC32MX_OC2_K1BASE+PIC32MX_OC_RSCLR_OFFSET)
+# define PIC32MX_OC2_RSSET (PIC32MX_OC2_K1BASE+PIC32MX_OC_RSSET_OFFSET)
+# define PIC32MX_OC2_RSINV (PIC32MX_OC2_K1BASE+PIC32MX_OC_RSINV_OFFSET)
+#endif
+
+#if CHIP_NOC > 2
+# define PIC32MX_OC3_CON (PIC32MX_OC3_K1BASE+PIC32MX_OC_CON_OFFSET)
+# define PIC32MX_OC3_CONCLR (PIC32MX_OC3_K1BASE+PIC32MX_OC_CONCLR_OFFSET)
+# define PIC32MX_OC3_CONSET (PIC32MX_OC3_K1BASE+PIC32MX_OC_CONSET_OFFSET)
+# define PIC32MX_OC3_CONINV (PIC32MX_OC3_K1BASE+PIC32MX_OC_CONINV_OFFSET)
+# define PIC32MX_OC3_R (PIC32MX_OC3_K1BASE+PIC32MX_OC_R_OFFSET)
+# define PIC32MX_OC3_RCLR (PIC32MX_OC3_K1BASE+PIC32MX_OC_RCLR_OFFSET)
+# define PIC32MX_OC3_RSET (PIC32MX_OC3_K1BASE+PIC32MX_OC_RSET_OFFSET)
+# define PIC32MX_OC3_RINV (PIC32MX_OC3_K1BASE+PIC32MX_OC_RINV_OFFSET)
+# define PIC32MX_OC3_RS (PIC32MX_OC3_K1BASE+PIC32MX_OC_RS_OFFSET)
+# define PIC32MX_OC3_RSCLR (PIC32MX_OC3_K1BASE+PIC32MX_OC_RSCLR_OFFSET)
+# define PIC32MX_OC3_RSSET (PIC32MX_OC3_K1BASE+PIC32MX_OC_RSSET_OFFSET)
+# define PIC32MX_OC3_RSINV (PIC32MX_OC3_K1BASE+PIC32MX_OC_RSINV_OFFSET)
+#endif
+
+#if CHIP_NOC > 3
+# define PIC32MX_OC4_CON (PIC32MX_OC4_K1BASE+PIC32MX_OC_CON_OFFSET)
+# define PIC32MX_OC4_CONCLR (PIC32MX_OC4_K1BASE+PIC32MX_OC_CONCLR_OFFSET)
+# define PIC32MX_OC4_CONSET (PIC32MX_OC4_K1BASE+PIC32MX_OC_CONSET_OFFSET)
+# define PIC32MX_OC4_CONINV (PIC32MX_OC4_K1BASE+PIC32MX_OC_CONINV_OFFSET)
+# define PIC32MX_OC4_R (PIC32MX_OC4_K1BASE+PIC32MX_OC_R_OFFSET)
+# define PIC32MX_OC4_RCLR (PIC32MX_OC4_K1BASE+PIC32MX_OC_RCLR_OFFSET)
+# define PIC32MX_OC4_RSET (PIC32MX_OC4_K1BASE+PIC32MX_OC_RSET_OFFSET)
+# define PIC32MX_OC4_RINV (PIC32MX_OC4_K1BASE+PIC32MX_OC_RINV_OFFSET)
+# define PIC32MX_OC4_RS (PIC32MX_OC4_K1BASE+PIC32MX_OC_RS_OFFSET)
+# define PIC32MX_OC4_RSCLR (PIC32MX_OC4_K1BASE+PIC32MX_OC_RSCLR_OFFSET)
+# define PIC32MX_OC4_RSSET (PIC32MX_OC4_K1BASE+PIC32MX_OC_RSSET_OFFSET)
+# define PIC32MX_OC4_RSINV (PIC32MX_OC4_K1BASE+PIC32MX_OC_RSINV_OFFSET)
+#endif
+
+#if CHIP_NOC > 4
+# define PIC32MX_OC5_CON (PIC32MX_OC5_K1BASE+PIC32MX_OC_CON_OFFSET)
+# define PIC32MX_OC5_CONCLR (PIC32MX_OC5_K1BASE+PIC32MX_OC_CONCLR_OFFSET)
+# define PIC32MX_OC5_CONSET (PIC32MX_OC5_K1BASE+PIC32MX_OC_CONSET_OFFSET)
+# define PIC32MX_OC5_CONINV (PIC32MX_OC5_K1BASE+PIC32MX_OC_CONINV_OFFSET)
+# define PIC32MX_OC5_R (PIC32MX_OC5_K1BASE+PIC32MX_OC_R_OFFSET)
+# define PIC32MX_OC5_RCLR (PIC32MX_OC5_K1BASE+PIC32MX_OC_RCLR_OFFSET)
+# define PIC32MX_OC5_RSET (PIC32MX_OC5_K1BASE+PIC32MX_OC_RSET_OFFSET)
+# define PIC32MX_OC5_RINV (PIC32MX_OC5_K1BASE+PIC32MX_OC_RINV_OFFSET)
+# define PIC32MX_OC5_RS (PIC32MX_OC5_K1BASE+PIC32MX_OC_RS_OFFSET)
+# define PIC32MX_OC5_RSCLR (PIC32MX_OC5_K1BASE+PIC32MX_OC_RSCLR_OFFSET)
+# define PIC32MX_OC5_RSSET (PIC32MX_OC5_K1BASE+PIC32MX_OC_RSSET_OFFSET)
+# define PIC32MX_OC5_RSINV (PIC32MX_OC5_K1BASE+PIC32MX_OC_RSINV_OFFSET)
+#endif
+
+/* Register Bit-Field Definitions ***************************************************/
+
+/* Output compare control register */
+
+#define OC_CON_OCM_SHIFT (0) /* Bits 0-2: Output compare mode select */
+#define OC_CON_OCM_MASK (7 << OC_CON_OCM_SHIFT)
+# define OC_CON_OCM_DISABLE (0 << OC_CON_OCM_SHIFT) /* Output compare peripheral disabled */
+# define OC_CON_OCM_LOW2HI (1 << OC_CON_OCM_SHIFT) /* OCx low; compare forces high */
+# define OC_CON_OCM_HITOLOW (2 << OC_CON_OCM_SHIFT) /* OCx high; compare forces low */
+# define OC_CON_OCM_TOGGLE (3 << OC_CON_OCM_SHIFT) /* Compare event toggles OCx */
+# define OC_CON_OCM_LOWPULSE (4 << OC_CON_OCM_SHIFT) /* OCx low; output pulse on OCx*/
+# define OC_CON_OCM_HIPULSE (5 << OC_CON_OCM_SHIFT) /* OCx high; output pulse on OCx */
+# define OC_CON_OCM_PWM (6 << OC_CON_OCM_SHIFT) /* PWM mode on OCx; fault disabled */
+# define OC_CON_OCM_PWMFAULT (7 << OC_CON_OCM_SHIFT) /* PWM mode on OCx; fault enabled */
+#define OC_CON_OCTSEL (1 << 3) /* Bit 3: Output compare timer select */
+#define OC_CON_OCFLT (1 << 4) /* Bit 4: PWM fault condition status */
+#define OC_CON_OC32 (1 << 5) /* Bit 5: 32-bit compare more */
+#define OC_CON_SIDL (1 << 13) /* Bit 13: Stop in idle mode */
+#define OC_CON_FRZ (1 << 14) /* Bit 14: Freeze in debug exception mode */
+#define OC_CON_ON (1 << 15) /* Bit 15: Output compare periperal on */
+
+/* Output compare data register -- 32-bit data register */
+
+/* Output compare secondary data register -- 32-bit data register */
+
+/************************************************************************************
+ * Public Types
+ ************************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/************************************************************************************
+ * Inline Functions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Public Function Prototypes
+ ************************************************************************************/
+
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C" {
+#else
+#define EXTERN extern
+#endif
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ASSEMBLY__ */
+#endif /* CHIP_NOC > 0 */
+#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_OC_H */
diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-timer.h b/nuttx/arch/mips/src/pic32mx/pic32mx-timer.h
index 6f359b5b6..ecaa05457 100644
--- a/nuttx/arch/mips/src/pic32mx/pic32mx-timer.h
+++ b/nuttx/arch/mips/src/pic32mx/pic32mx-timer.h
@@ -1,222 +1,222 @@
-/************************************************************************************
- * arch/mips/src/pic32mx/pic32mx-timer.h
- *
- * Copyright (C) 2011 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_MIPS_SRC_PIC32MX_PIC32MX_TIMER_H
-#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_TIMER_H
-
-/************************************************************************************
- * Included Files
- ************************************************************************************/
-
-#include <nuttx/config.h>
-
-#include "chip.h"
-#include "pic32mx-memorymap.h"
-
-#if CHIP_NTIMERS > 0
-
-/************************************************************************************
- * Pre-Processor Definitions
- ************************************************************************************/
-/* Register Offsets *****************************************************************/
-
-#define PIC32MX_TIMER_CON_OFFSET 0x0000 /* Timer control register */
-#define PIC32MX_TIMER_CONCLR_OFFSET 0x0004 /* Timer control clear register */
-#define PIC32MX_TIMER_CONSET_OFFSET 0x0008 /* Timer control set register */
-#define PIC32MX_TIMER_CONINV_OFFSET 0x000c /* Timer control invert register */
-#define PIC32MX_TIMER_CNT_OFFSET 0x0010 /* Timer count register */
-#define PIC32MX_TIMER_CNTCLR_OFFSET 0x0014 /* Timer count clear register */
-#define PIC32MX_TIMER_CNTSET_OFFSET 0x0018 /* Timer count set register */
-#define PIC32MX_TIMER_CNTINV_OFFSET 0x001c /* Timer count invert register */
-#define PIC32MX_TIMER_PR_OFFSET 0x0020 /* Timer period register */
-#define PIC32MX_TIMER_PRCLR_OFFSET 0x0024 /* Timer period clear register */
-#define PIC32MX_TIMER_PRSET_OFFSET 0x0028 /* Timer period set register */
-#define PIC32MX_TIMER_PRINV_OFFSET 0x002c /* Timer period invert register */
-
-/* Register Addresses ***************************************************************/
-
-#define PIC32MX_TIMER_CON(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_CON_OFFSET)
-#define PIC32MX_TIMER_CONCLR(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_CONCLR_OFFSET)
-#define PIC32MX_TIMER_CONSET(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_CONSET_OFFSET)
-#define PIC32MX_TIMER_CONINV(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_CONINV_OFFSET)
-#define PIC32MX_TIMER_CNT(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_CNT_OFFSET)
-#define PIC32MX_TIMER_CNTCLR(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_CNTCLR_OFFSET)
-#define PIC32MX_TIMER_CNTSET(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_CNTSET_OFFSET)
-#define PIC32MX_TIMER_CNTINV(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_CNTINV_OFFSET)
-#define PIC32MX_TIMER_PR(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_PR_OFFSET)
-#define PIC32MX_TIMER_PRCLR(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_PRCLR_OFFSET)
-#define PIC32MX_TIMER_PRSET(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_PRSET_OFFSET)
-#define PIC32MX_TIMER_PRINV(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_PRINV_OFFSET)
-
-#define PIC32MX_TIMER1_CON (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_CON_OFFSET)
-#define PIC32MX_TIMER1_CONCLR (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_CONCLR_OFFSET)
-#define PIC32MX_TIMER1_CONSET (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_CONSET_OFFSET)
-#define PIC32MX_TIMER1_CONINV (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_CONINV_OFFSET)
-#define PIC32MX_TIMER1_CNT (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_CNT_OFFSET)
-#define PIC32MX_TIMER1_CNTCLR (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_CNTCLR_OFFSET)
-#define PIC32MX_TIMER1_CNTSET (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_CNTSET_OFFSET)
-#define PIC32MX_TIMER1_CNTINV (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_CNTINV_OFFSET)
-#define PIC32MX_TIMER1_PR (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_PR_OFFSET)
-#define PIC32MX_TIMER1_PRCLR (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_PRCLR_OFFSET)
-#define PIC32MX_TIMER1_PRSET (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_PRSET_OFFSET)
-#define PIC32MX_TIMER1_PRINV (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_PRINV_OFFSET)
-
-#if CHIP_NTIMERS > 1
-# define PIC32MX_TIMER2_CON (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_CON_OFFSET)
-# define PIC32MX_TIMER2_CONCLR (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_CONCLR_OFFSET)
-# define PIC32MX_TIMER2_CONSET (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_CONSET_OFFSET)
-# define PIC32MX_TIMER2_CONINV (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_CONINV_OFFSET)
-# define PIC32MX_TIMER2_CNT (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_CNT_OFFSET)
-# define PIC32MX_TIMER2_CNTCLR (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_CNTCLR_OFFSET)
-# define PIC32MX_TIMER2_CNTSET (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_CNTSET_OFFSET)
-# define PIC32MX_TIMER2_CNTINV (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_CNTINV_OFFSET)
-# define PIC32MX_TIMER2_PR (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_PR_OFFSET)
-# define PIC32MX_TIMER2_PRCLR (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_PRCLR_OFFSET)
-# define PIC32MX_TIMER2_PRSET (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_PRSET_OFFSET)
-# define PIC32MX_TIMER2_PRINV (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_PRINV_OFFSET)
-#endif
-
-#if CHIP_NTIMERS > 2
-# define PIC32MX_TIMER3_CON (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_CON_OFFSET)
-# define PIC32MX_TIMER3_CONCLR (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_CONCLR_OFFSET)
-# define PIC32MX_TIMER3_CONSET (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_CONSET_OFFSET)
-# define PIC32MX_TIMER3_CONINV (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_CONINV_OFFSET)
-# define PIC32MX_TIMER3_CNT (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_CNT_OFFSET)
-# define PIC32MX_TIMER3_CNTCLR (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_CNTCLR_OFFSET)
-# define PIC32MX_TIMER3_CNTSET (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_CNTSET_OFFSET)
-# define PIC32MX_TIMER3_CNTINV (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_CNTINV_OFFSET)
-# define PIC32MX_TIMER3_PR (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_PR_OFFSET)
-# define PIC32MX_TIMER3_PRCLR (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_PRCLR_OFFSET)
-# define PIC32MX_TIMER3_PRSET (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_PRSET_OFFSET)
-# define PIC32MX_TIMER3_PRINV (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_PRINV_OFFSET)
-#endif
-
-#if CHIP_NTIMERS > 3
-# define PIC32MX_TIMER4_CON (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_CON_OFFSET)
-# define PIC32MX_TIMER4_CONCLR (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_CONCLR_OFFSET)
-# define PIC32MX_TIMER4_CONSET (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_CONSET_OFFSET)
-# define PIC32MX_TIMER4_CONINV (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_CONINV_OFFSET)
-# define PIC32MX_TIMER4_CNT (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_CNT_OFFSET)
-# define PIC32MX_TIMER4_CNTCLR (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_CNTCLR_OFFSET)
-# define PIC32MX_TIMER4_CNTSET (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_CNTSET_OFFSET)
-# define PIC32MX_TIMER4_CNTINV (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_CNTINV_OFFSET)
-# define PIC32MX_TIMER4_PR (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_PR_OFFSET)
-# define PIC32MX_TIMER4_PRCLR (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_PRCLR_OFFSET)
-# define PIC32MX_TIMER4_PRSET (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_PRSET_OFFSET)
-# define PIC32MX_TIMER4_PRINV (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_PRINV_OFFSET)
-#endif
-
-#if CHIP_NTIMERS > 4
-# define PIC32MX_TIMER5_CON (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_CON_OFFSET)
-# define PIC32MX_TIMER5_CONCLR (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_CONCLR_OFFSET)
-# define PIC32MX_TIMER5_CONSET (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_CONSET_OFFSET)
-# define PIC32MX_TIMER5_CONINV (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_CONINV_OFFSET)
-# define PIC32MX_TIMER5_CNT (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_CNT_OFFSET)
-# define PIC32MX_TIMER5_CNTCLR (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_CNTCLR_OFFSET)
-# define PIC32MX_TIMER5_CNTSET (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_CNTSET_OFFSET)
-# define PIC32MX_TIMER5_CNTINV (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_CNTINV_OFFSET)
-# define PIC32MX_TIMER5_PR (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_PR_OFFSET)
-# define PIC32MX_TIMER5_PRCLR (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_PRCLR_OFFSET)
-# define PIC32MX_TIMER5_PRSET (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_PRSET_OFFSET)
-# define PIC32MX_TIMER5_PRINV (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_PRINV_OFFSET)
-#endif
-
-/* Register Bit-Field Definitions ***************************************************/
-
-/* Timer control register */
-
-#define TIMER_CON_TCS (1 << 1) /* Bit 1: Timer clock source select (all) */
-#define TIMER1_CON_TSYNC (1 << 2) /* Bit 2: Timer external clock input synchronization selection (timer 1 only) */
-#define TIMER_CON_T32 (1 << 3) /* Bit 2: 32-bit timer mode select (even timers only) */
-#define TIMER_CON_TCKPS_SHIFT (4) /* Bits 4-6: Timer input clock prescale select (all except timer 1) */
-#define TIMER_CON_TCKPS_MASK (7 << TIMER_CON_TCKPS_SHIFT)
-# define TIMER_CON_TCKPS_1 (0 << TIMER_CON_TCKPS_SHIFT) /* 1:1 prescale value */
-# define TIMER_CON_TCKPS_2 (1 << TIMER_CON_TCKPS_SHIFT) /* 1:2 prescale value */
-# define TIMER_CON_TCKPS_4 (2 << TIMER_CON_TCKPS_SHIFT) /* 1:4 prescale value */
-# define TIMER_CON_TCKPS_8 (3 << TIMER_CON_TCKPS_SHIFT) /* 1:8 prescale value */
-# define TIMER_CON_TCKPS_16 (4 << TIMER_CON_TCKPS_SHIFT) /* 1:16 prescale value */
-# define TIMER_CON_TCKPS_32 (5 << TIMER_CON_TCKPS_SHIFT) /* 1:32 prescale value */
-# define TIMER_CON_TCKPS_64 (6 << TIMER_CON_TCKPS_SHIFT) /* 1:64 prescale value */
-# define TIMER_CON_TCKPS_256 (7 << TIMER_CON_TCKPS_SHIFT) /* 1:256 prescale value */
-#define TIMER1_CON_TCKPS_SHIFT (4) /* Bits 4-5: Timer input clock prescale select (timer 1 only) */
-#define TIMER1_CON_TCKPS_MASK (3 << TIMER1_CON_TCKPS_SHIFT)
-# define TIMER1_CON_TCKPS_1 (0 << TIMER1_CON_TCKPS_SHIFT) /* 1:1 prescale value */
-# define TIMER1_CON_TCKPS_8 (1 << TIMER1_CON_TCKPS_SHIFT) /* 1:8 prescale value */
-# define TIMER1_CON_TCKPS_64 (2 << TIMER1_CON_TCKPS_SHIFT) /* 1:64 prescale value */
-# define TIMER1_CON_TCKPS_256 (3 << TIMER1_CON_TCKPS_SHIFT) /* 1:256 prescale value */
-#define TIMER_CON_TGATE (1 << 7) /* Bit 7: Timer gated time accumulation enable (all) */
-#define TIMER1_CON_TWIP (1 << 11) /* Bit 11: Asynchronous timer write in progress (timer 1 only) */
-#define TIMER1_CON_TWDIS (1 << 12) /* Bit 12: Asynchronous timer write disable (timer 1 only) */
-#define TIMER_CON_SIDL (1 << 13) /* Bit 13: Stop in idle mode (all) */
-#define TIMER_CON_FRZ (1 << 14) /* Bit 14: Freeze in debug exception mode (all) */
-#define TIMER_CON_ON (1 << 15) /* Bit 15: Timer on (all) */
-
-/* Timer count register */
-
-#define TIMER_CNT_MASK 0xffff /* 16-bit timer counter value */
-
-/* Timer period register */
-
-#define TIMER_PR_MASK 0xffff /* 16-bit timer period value */
-
-/************************************************************************************
- * Public Types
- ************************************************************************************/
-
-#ifndef __ASSEMBLY__
-
-/************************************************************************************
- * Inline Functions
- ************************************************************************************/
-
-/************************************************************************************
- * Public Function Prototypes
- ************************************************************************************/
-
-#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
-#endif
-
-#undef EXTERN
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __ASSEMBLY__ */
-#endif /* CHIP_NTIMERS > 0 */
-#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_TIMER_H */
+/************************************************************************************
+ * arch/mips/src/pic32mx/pic32mx-timer.h
+ *
+ * Copyright (C) 2011 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_MIPS_SRC_PIC32MX_PIC32MX_TIMER_H
+#define __ARCH_MIPS_SRC_PIC32MX_PIC32MX_TIMER_H
+
+/************************************************************************************
+ * Included Files
+ ************************************************************************************/
+
+#include <nuttx/config.h>
+
+#include "chip.h"
+#include "pic32mx-memorymap.h"
+
+#if CHIP_NTIMERS > 0
+
+/************************************************************************************
+ * Pre-Processor Definitions
+ ************************************************************************************/
+/* Register Offsets *****************************************************************/
+
+#define PIC32MX_TIMER_CON_OFFSET 0x0000 /* Timer control register */
+#define PIC32MX_TIMER_CONCLR_OFFSET 0x0004 /* Timer control clear register */
+#define PIC32MX_TIMER_CONSET_OFFSET 0x0008 /* Timer control set register */
+#define PIC32MX_TIMER_CONINV_OFFSET 0x000c /* Timer control invert register */
+#define PIC32MX_TIMER_CNT_OFFSET 0x0010 /* Timer count register */
+#define PIC32MX_TIMER_CNTCLR_OFFSET 0x0014 /* Timer count clear register */
+#define PIC32MX_TIMER_CNTSET_OFFSET 0x0018 /* Timer count set register */
+#define PIC32MX_TIMER_CNTINV_OFFSET 0x001c /* Timer count invert register */
+#define PIC32MX_TIMER_PR_OFFSET 0x0020 /* Timer period register */
+#define PIC32MX_TIMER_PRCLR_OFFSET 0x0024 /* Timer period clear register */
+#define PIC32MX_TIMER_PRSET_OFFSET 0x0028 /* Timer period set register */
+#define PIC32MX_TIMER_PRINV_OFFSET 0x002c /* Timer period invert register */
+
+/* Register Addresses ***************************************************************/
+
+#define PIC32MX_TIMER_CON(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_CON_OFFSET)
+#define PIC32MX_TIMER_CONCLR(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_CONCLR_OFFSET)
+#define PIC32MX_TIMER_CONSET(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_CONSET_OFFSET)
+#define PIC32MX_TIMER_CONINV(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_CONINV_OFFSET)
+#define PIC32MX_TIMER_CNT(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_CNT_OFFSET)
+#define PIC32MX_TIMER_CNTCLR(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_CNTCLR_OFFSET)
+#define PIC32MX_TIMER_CNTSET(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_CNTSET_OFFSET)
+#define PIC32MX_TIMER_CNTINV(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_CNTINV_OFFSET)
+#define PIC32MX_TIMER_PR(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_PR_OFFSET)
+#define PIC32MX_TIMER_PRCLR(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_PRCLR_OFFSET)
+#define PIC32MX_TIMER_PRSET(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_PRSET_OFFSET)
+#define PIC32MX_TIMER_PRINV(n) (PIC32MX_TIMER_K1BASE(n)+PIC32MX_TIMER_PRINV_OFFSET)
+
+#define PIC32MX_TIMER1_CON (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_CON_OFFSET)
+#define PIC32MX_TIMER1_CONCLR (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_CONCLR_OFFSET)
+#define PIC32MX_TIMER1_CONSET (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_CONSET_OFFSET)
+#define PIC32MX_TIMER1_CONINV (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_CONINV_OFFSET)
+#define PIC32MX_TIMER1_CNT (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_CNT_OFFSET)
+#define PIC32MX_TIMER1_CNTCLR (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_CNTCLR_OFFSET)
+#define PIC32MX_TIMER1_CNTSET (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_CNTSET_OFFSET)
+#define PIC32MX_TIMER1_CNTINV (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_CNTINV_OFFSET)
+#define PIC32MX_TIMER1_PR (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_PR_OFFSET)
+#define PIC32MX_TIMER1_PRCLR (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_PRCLR_OFFSET)
+#define PIC32MX_TIMER1_PRSET (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_PRSET_OFFSET)
+#define PIC32MX_TIMER1_PRINV (PIC32MX_TIMER1_K1BASE+PIC32MX_TIMER_PRINV_OFFSET)
+
+#if CHIP_NTIMERS > 1
+# define PIC32MX_TIMER2_CON (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_CON_OFFSET)
+# define PIC32MX_TIMER2_CONCLR (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_CONCLR_OFFSET)
+# define PIC32MX_TIMER2_CONSET (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_CONSET_OFFSET)
+# define PIC32MX_TIMER2_CONINV (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_CONINV_OFFSET)
+# define PIC32MX_TIMER2_CNT (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_CNT_OFFSET)
+# define PIC32MX_TIMER2_CNTCLR (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_CNTCLR_OFFSET)
+# define PIC32MX_TIMER2_CNTSET (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_CNTSET_OFFSET)
+# define PIC32MX_TIMER2_CNTINV (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_CNTINV_OFFSET)
+# define PIC32MX_TIMER2_PR (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_PR_OFFSET)
+# define PIC32MX_TIMER2_PRCLR (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_PRCLR_OFFSET)
+# define PIC32MX_TIMER2_PRSET (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_PRSET_OFFSET)
+# define PIC32MX_TIMER2_PRINV (PIC32MX_TIMER2_K1BASE+PIC32MX_TIMER_PRINV_OFFSET)
+#endif
+
+#if CHIP_NTIMERS > 2
+# define PIC32MX_TIMER3_CON (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_CON_OFFSET)
+# define PIC32MX_TIMER3_CONCLR (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_CONCLR_OFFSET)
+# define PIC32MX_TIMER3_CONSET (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_CONSET_OFFSET)
+# define PIC32MX_TIMER3_CONINV (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_CONINV_OFFSET)
+# define PIC32MX_TIMER3_CNT (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_CNT_OFFSET)
+# define PIC32MX_TIMER3_CNTCLR (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_CNTCLR_OFFSET)
+# define PIC32MX_TIMER3_CNTSET (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_CNTSET_OFFSET)
+# define PIC32MX_TIMER3_CNTINV (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_CNTINV_OFFSET)
+# define PIC32MX_TIMER3_PR (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_PR_OFFSET)
+# define PIC32MX_TIMER3_PRCLR (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_PRCLR_OFFSET)
+# define PIC32MX_TIMER3_PRSET (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_PRSET_OFFSET)
+# define PIC32MX_TIMER3_PRINV (PIC32MX_TIMER3_K1BASE+PIC32MX_TIMER_PRINV_OFFSET)
+#endif
+
+#if CHIP_NTIMERS > 3
+# define PIC32MX_TIMER4_CON (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_CON_OFFSET)
+# define PIC32MX_TIMER4_CONCLR (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_CONCLR_OFFSET)
+# define PIC32MX_TIMER4_CONSET (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_CONSET_OFFSET)
+# define PIC32MX_TIMER4_CONINV (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_CONINV_OFFSET)
+# define PIC32MX_TIMER4_CNT (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_CNT_OFFSET)
+# define PIC32MX_TIMER4_CNTCLR (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_CNTCLR_OFFSET)
+# define PIC32MX_TIMER4_CNTSET (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_CNTSET_OFFSET)
+# define PIC32MX_TIMER4_CNTINV (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_CNTINV_OFFSET)
+# define PIC32MX_TIMER4_PR (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_PR_OFFSET)
+# define PIC32MX_TIMER4_PRCLR (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_PRCLR_OFFSET)
+# define PIC32MX_TIMER4_PRSET (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_PRSET_OFFSET)
+# define PIC32MX_TIMER4_PRINV (PIC32MX_TIMER4_K1BASE+PIC32MX_TIMER_PRINV_OFFSET)
+#endif
+
+#if CHIP_NTIMERS > 4
+# define PIC32MX_TIMER5_CON (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_CON_OFFSET)
+# define PIC32MX_TIMER5_CONCLR (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_CONCLR_OFFSET)
+# define PIC32MX_TIMER5_CONSET (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_CONSET_OFFSET)
+# define PIC32MX_TIMER5_CONINV (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_CONINV_OFFSET)
+# define PIC32MX_TIMER5_CNT (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_CNT_OFFSET)
+# define PIC32MX_TIMER5_CNTCLR (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_CNTCLR_OFFSET)
+# define PIC32MX_TIMER5_CNTSET (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_CNTSET_OFFSET)
+# define PIC32MX_TIMER5_CNTINV (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_CNTINV_OFFSET)
+# define PIC32MX_TIMER5_PR (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_PR_OFFSET)
+# define PIC32MX_TIMER5_PRCLR (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_PRCLR_OFFSET)
+# define PIC32MX_TIMER5_PRSET (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_PRSET_OFFSET)
+# define PIC32MX_TIMER5_PRINV (PIC32MX_TIMER5_K1BASE+PIC32MX_TIMER_PRINV_OFFSET)
+#endif
+
+/* Register Bit-Field Definitions ***************************************************/
+
+/* Timer control register */
+
+#define TIMER_CON_TCS (1 << 1) /* Bit 1: Timer clock source select (all) */
+#define TIMER1_CON_TSYNC (1 << 2) /* Bit 2: Timer external clock input synchronization selection (timer 1 only) */
+#define TIMER_CON_T32 (1 << 3) /* Bit 2: 32-bit timer mode select (even timers only) */
+#define TIMER_CON_TCKPS_SHIFT (4) /* Bits 4-6: Timer input clock prescale select (all except timer 1) */
+#define TIMER_CON_TCKPS_MASK (7 << TIMER_CON_TCKPS_SHIFT)
+# define TIMER_CON_TCKPS_1 (0 << TIMER_CON_TCKPS_SHIFT) /* 1:1 prescale value */
+# define TIMER_CON_TCKPS_2 (1 << TIMER_CON_TCKPS_SHIFT) /* 1:2 prescale value */
+# define TIMER_CON_TCKPS_4 (2 << TIMER_CON_TCKPS_SHIFT) /* 1:4 prescale value */
+# define TIMER_CON_TCKPS_8 (3 << TIMER_CON_TCKPS_SHIFT) /* 1:8 prescale value */
+# define TIMER_CON_TCKPS_16 (4 << TIMER_CON_TCKPS_SHIFT) /* 1:16 prescale value */
+# define TIMER_CON_TCKPS_32 (5 << TIMER_CON_TCKPS_SHIFT) /* 1:32 prescale value */
+# define TIMER_CON_TCKPS_64 (6 << TIMER_CON_TCKPS_SHIFT) /* 1:64 prescale value */
+# define TIMER_CON_TCKPS_256 (7 << TIMER_CON_TCKPS_SHIFT) /* 1:256 prescale value */
+#define TIMER1_CON_TCKPS_SHIFT (4) /* Bits 4-5: Timer input clock prescale select (timer 1 only) */
+#define TIMER1_CON_TCKPS_MASK (3 << TIMER1_CON_TCKPS_SHIFT)
+# define TIMER1_CON_TCKPS_1 (0 << TIMER1_CON_TCKPS_SHIFT) /* 1:1 prescale value */
+# define TIMER1_CON_TCKPS_8 (1 << TIMER1_CON_TCKPS_SHIFT) /* 1:8 prescale value */
+# define TIMER1_CON_TCKPS_64 (2 << TIMER1_CON_TCKPS_SHIFT) /* 1:64 prescale value */
+# define TIMER1_CON_TCKPS_256 (3 << TIMER1_CON_TCKPS_SHIFT) /* 1:256 prescale value */
+#define TIMER_CON_TGATE (1 << 7) /* Bit 7: Timer gated time accumulation enable (all) */
+#define TIMER1_CON_TWIP (1 << 11) /* Bit 11: Asynchronous timer write in progress (timer 1 only) */
+#define TIMER1_CON_TWDIS (1 << 12) /* Bit 12: Asynchronous timer write disable (timer 1 only) */
+#define TIMER_CON_SIDL (1 << 13) /* Bit 13: Stop in idle mode (all) */
+#define TIMER_CON_FRZ (1 << 14) /* Bit 14: Freeze in debug exception mode (all) */
+#define TIMER_CON_ON (1 << 15) /* Bit 15: Timer on (all) */
+
+/* Timer count register */
+
+#define TIMER_CNT_MASK 0xffff /* 16-bit timer counter value */
+
+/* Timer period register */
+
+#define TIMER_PR_MASK 0xffff /* 16-bit timer period value */
+
+/************************************************************************************
+ * Public Types
+ ************************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/************************************************************************************
+ * Inline Functions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Public Function Prototypes
+ ************************************************************************************/
+
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C" {
+#else
+#define EXTERN extern
+#endif
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ASSEMBLY__ */
+#endif /* CHIP_NTIMERS > 0 */
+#endif /* __ARCH_MIPS_SRC_PIC32MX_PIC32MX_TIMER_H */
diff --git a/nuttx/arch/sh/src/common/up_allocateheap.c b/nuttx/arch/sh/src/common/up_allocateheap.c
index 9479c27c5..ee7e90e05 100644
--- a/nuttx/arch/sh/src/common/up_allocateheap.c
+++ b/nuttx/arch/sh/src/common/up_allocateheap.c
@@ -80,7 +80,7 @@
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
{
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)g_idle_topstack;
*heap_size = CONFIG_RAM_END - g_idle_topstack;
}
diff --git a/nuttx/arch/sh/src/common/up_assert.c b/nuttx/arch/sh/src/common/up_assert.c
index 7e8f13451..372282804 100644
--- a/nuttx/arch/sh/src/common/up_assert.c
+++ b/nuttx/arch/sh/src/common/up_assert.c
@@ -87,9 +87,9 @@ static void _up_assert(int errorcode)
for(;;)
{
#ifdef CONFIG_ARCH_LEDS
- up_ledon(LED_PANIC);
+ board_led_on(LED_PANIC);
up_mdelay(250);
- up_ledoff(LED_PANIC);
+ board_led_off(LED_PANIC);
up_mdelay(250);
#endif
}
@@ -114,7 +114,7 @@ void up_assert(const uint8_t *filename, int lineno)
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
#if CONFIG_TASK_NAME_SIZE > 0
lldbg("Assertion failed at file:%s line: %d task: %s\n",
diff --git a/nuttx/arch/sh/src/common/up_createstack.c b/nuttx/arch/sh/src/common/up_createstack.c
index 5a22fd3e6..280b5a6b9 100644
--- a/nuttx/arch/sh/src/common/up_createstack.c
+++ b/nuttx/arch/sh/src/common/up_createstack.c
@@ -192,7 +192,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
- up_ledon(LED_STACKCREATED);
+ board_led_on(LED_STACKCREATED);
return OK;
}
diff --git a/nuttx/arch/sh/src/common/up_doirq.c b/nuttx/arch/sh/src/common/up_doirq.c
index d6a121330..c9ba18bad 100644
--- a/nuttx/arch/sh/src/common/up_doirq.c
+++ b/nuttx/arch/sh/src/common/up_doirq.c
@@ -71,7 +71,7 @@
uint32_t *up_doirq(int irq, uint32_t* regs)
{
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
#ifdef CONFIG_SUPPRESS_INTERRUPTS
PANIC();
#else
@@ -127,7 +127,7 @@ uint32_t *up_doirq(int irq, uint32_t* regs)
up_enable_irq(irq);
#endif
}
- up_ledoff(LED_INIRQ);
+ board_led_off(LED_INIRQ);
#endif
return regs;
}
diff --git a/nuttx/arch/sh/src/common/up_initialize.c b/nuttx/arch/sh/src/common/up_initialize.c
index 6f75106b2..9b43b2a94 100644
--- a/nuttx/arch/sh/src/common/up_initialize.c
+++ b/nuttx/arch/sh/src/common/up_initialize.c
@@ -180,5 +180,5 @@ void up_initialize(void)
up_usbinitialize();
- up_ledon(LED_IRQSENABLED);
+ board_led_on(LED_IRQSENABLED);
}
diff --git a/nuttx/arch/sh/src/common/up_internal.h b/nuttx/arch/sh/src/common/up_internal.h
index 43fc38cc5..cba4715bd 100644
--- a/nuttx/arch/sh/src/common/up_internal.h
+++ b/nuttx/arch/sh/src/common/up_internal.h
@@ -219,13 +219,13 @@ extern void up_maskack_irq(int irq);
/* Defined in board/up_leds.c */
#ifdef CONFIG_ARCH_LEDS
-extern void up_ledinit(void);
-extern void up_ledon(int led);
-extern void up_ledoff(int led);
+extern void board_led_initialize(void);
+extern void board_led_on(int led);
+extern void board_led_off(int led);
#else
-# define up_ledinit()
-# define up_ledon(led)
-# define up_ledoff(led)
+# define board_led_initialize()
+# define board_led_on(led)
+# define board_led_off(led)
#endif
/* Defined in board/up_lcd.c */
diff --git a/nuttx/arch/sh/src/m16c/m16c_head.S b/nuttx/arch/sh/src/m16c/m16c_head.S
index 470946313..e1eca90f1 100644
--- a/nuttx/arch/sh/src/m16c/m16c_head.S
+++ b/nuttx/arch/sh/src/m16c/m16c_head.S
@@ -260,8 +260,8 @@ __start:
/* Initialize onboard LEDs */
#ifdef CONFIG_ARCH_LEDS
- .globl _up_ledinit /* Boot LED setup */
- jsr.a _up_ledinit /* Call it */
+ .globl _board_led_initialize /* Boot LED setup */
+ jsr.a _board_led_initialize /* Call it */
#endif
showprogress '\n'
diff --git a/nuttx/arch/sh/src/m16c/m16c_sigdeliver.c b/nuttx/arch/sh/src/m16c/m16c_sigdeliver.c
index 7bba3b902..003dde8ab 100644
--- a/nuttx/arch/sh/src/m16c/m16c_sigdeliver.c
+++ b/nuttx/arch/sh/src/m16c/m16c_sigdeliver.c
@@ -92,7 +92,7 @@ void up_sigdeliver(void)
int saved_errno = rtcb->pterrno;
- up_ledon(LED_SIGNAL);
+ board_led_on(LED_SIGNAL);
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
@@ -135,7 +135,7 @@ void up_sigdeliver(void)
* execution.
*/
- up_ledoff(LED_SIGNAL);
+ board_led_off(LED_SIGNAL);
up_fullcontextrestore(regs);
#endif
}
diff --git a/nuttx/arch/sh/src/sh1/sh1_head.S b/nuttx/arch/sh/src/sh1/sh1_head.S
index 774d22784..89d6bf288 100644
--- a/nuttx/arch/sh/src/sh1/sh1_head.S
+++ b/nuttx/arch/sh/src/sh1/sh1_head.S
@@ -65,7 +65,7 @@
.globl _up_earlyconsoleinit /* Early initialization of console driver */
#endif
#ifdef CONFIG_ARCH_LEDS
- .globl _up_ledinit /* Boot LED setup */
+ .globl _board_led_initialize /* Boot LED setup */
#endif
#ifdef CONFIG_DEBUG
.globl _up_lowputc /* Low-level debug output */
@@ -445,7 +445,7 @@ __start0:
/* Initialize onboard LEDs */
#ifdef CONFIG_ARCH_LEDS
- mov.l .Lledinit, r0 /* Address of up_ledinit */
+ mov.l .Lledinit, r0 /* Address of board_led_initialize */
jsr @r0 /* Call it */
or r0, r0 /* Delay slot */
#endif
@@ -492,7 +492,7 @@ __start0:
.long _up_lowputc
#endif
.Lledinit:
- .long _up_ledinit
+ .long _board_led_initialize
.Losstart:
.long _os_start
.Lsvect:
diff --git a/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c b/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c
index eb278163d..00c7fd340 100644
--- a/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c
+++ b/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c
@@ -92,7 +92,7 @@ void up_sigdeliver(void)
int saved_errno = rtcb->pterrno;
- up_ledon(LED_SIGNAL);
+ board_led_on(LED_SIGNAL);
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
@@ -132,7 +132,7 @@ void up_sigdeliver(void)
/* Then restore the correct state for this thread of execution. */
- up_ledoff(LED_SIGNAL);
+ board_led_off(LED_SIGNAL);
up_fullcontextrestore(regs);
#endif
}
diff --git a/nuttx/arch/x86/src/common/up_allocateheap.c b/nuttx/arch/x86/src/common/up_allocateheap.c
index aff355d30..c51e3d855 100644
--- a/nuttx/arch/x86/src/common/up_allocateheap.c
+++ b/nuttx/arch/x86/src/common/up_allocateheap.c
@@ -81,7 +81,7 @@
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
{
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
*heap_start = (FAR void*)g_idle_topstack;
*heap_size = CONFIG_RAM_END - g_idle_topstack;
}
diff --git a/nuttx/arch/x86/src/common/up_assert.c b/nuttx/arch/x86/src/common/up_assert.c
index 7db69d884..1cb2d682f 100644
--- a/nuttx/arch/x86/src/common/up_assert.c
+++ b/nuttx/arch/x86/src/common/up_assert.c
@@ -220,9 +220,9 @@ static void _up_assert(int errorcode)
for(;;)
{
#ifdef CONFIG_ARCH_LEDS
- up_ledon(LED_PANIC);
+ board_led_on(LED_PANIC);
up_mdelay(250);
- up_ledoff(LED_PANIC);
+ board_led_off(LED_PANIC);
up_mdelay(250);
#endif
}
@@ -247,7 +247,7 @@ void up_assert(const uint8_t *filename, int lineno)
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
#ifdef CONFIG_PRINT_TASKNAME
lldbg("Assertion failed at file:%s line: %d task: %s\n",
diff --git a/nuttx/arch/x86/src/common/up_initialize.c b/nuttx/arch/x86/src/common/up_initialize.c
index cb8fe79ca..4e25ae415 100644
--- a/nuttx/arch/x86/src/common/up_initialize.c
+++ b/nuttx/arch/x86/src/common/up_initialize.c
@@ -191,5 +191,5 @@ void up_initialize(void)
/* Initialize USB -- device and/or host */
up_usbinitialize();
- up_ledon(LED_IRQSENABLED);
+ board_led_on(LED_IRQSENABLED);
}
diff --git a/nuttx/arch/x86/src/common/up_internal.h b/nuttx/arch/x86/src/common/up_internal.h
index 173883280..4d6852fc2 100644
--- a/nuttx/arch/x86/src/common/up_internal.h
+++ b/nuttx/arch/x86/src/common/up_internal.h
@@ -241,13 +241,13 @@ extern void up_maskack_irq(int irq);
/* Defined in board/up_leds.c */
#ifdef CONFIG_ARCH_LEDS
-extern void up_ledinit(void);
-extern void up_ledon(int led);
-extern void up_ledoff(int led);
+extern void board_led_initialize(void);
+extern void board_led_on(int led);
+extern void board_led_off(int led);
#else
-# define up_ledinit()
-# define up_ledon(led)
-# define up_ledoff(led)
+# define board_led_initialize()
+# define board_led_on(led)
+# define board_led_off(led)
#endif
/* Defined in board/up_network.c */
diff --git a/nuttx/arch/x86/src/i486/up_createstack.c b/nuttx/arch/x86/src/i486/up_createstack.c
index ae394dea6..a619ed19b 100644
--- a/nuttx/arch/x86/src/i486/up_createstack.c
+++ b/nuttx/arch/x86/src/i486/up_createstack.c
@@ -192,7 +192,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
- up_ledon(LED_STACKCREATED);
+ board_led_on(LED_STACKCREATED);
return OK;
}
diff --git a/nuttx/arch/x86/src/i486/up_sigdeliver.c b/nuttx/arch/x86/src/i486/up_sigdeliver.c
index 0f2082a20..1e87e78c6 100644
--- a/nuttx/arch/x86/src/i486/up_sigdeliver.c
+++ b/nuttx/arch/x86/src/i486/up_sigdeliver.c
@@ -92,7 +92,7 @@ void up_sigdeliver(void)
int saved_errno = rtcb->pterrno;
- up_ledon(LED_SIGNAL);
+ board_led_on(LED_SIGNAL);
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
@@ -131,7 +131,7 @@ void up_sigdeliver(void)
/* Then restore the correct state for this thread of execution. */
- up_ledoff(LED_SIGNAL);
+ board_led_off(LED_SIGNAL);
up_fullcontextrestore(regs);
}
diff --git a/nuttx/arch/x86/src/qemu/qemu_handlers.c b/nuttx/arch/x86/src/qemu/qemu_handlers.c
index ae889a63f..53b9ff582 100644
--- a/nuttx/arch/x86/src/qemu/qemu_handlers.c
+++ b/nuttx/arch/x86/src/qemu/qemu_handlers.c
@@ -89,7 +89,7 @@ static uint32_t *common_handler(int irq, uint32_t *regs)
{
uint32_t *savestate;
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
/* Nested interrupts are not supported in this implementation. If you want
* implemented nested interrupts, you would have to (1) change the way that
@@ -141,7 +141,7 @@ static uint32_t *common_handler(int irq, uint32_t *regs)
uint32_t *isr_handler(uint32_t *regs)
{
#ifdef CONFIG_SUPPRESS_INTERRUPTS
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
PANIC(); /* Doesn't return */
return regs; /* To keep the compiler happy */
#else
@@ -149,9 +149,9 @@ uint32_t *isr_handler(uint32_t *regs)
/* Dispatch the interrupt */
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
ret = common_handler((int)regs[REG_IRQNO], regs);
- up_ledoff(LED_INIRQ);
+ board_led_off(LED_INIRQ);
return ret;
#endif
}
@@ -167,14 +167,14 @@ uint32_t *isr_handler(uint32_t *regs)
uint32_t *irq_handler(uint32_t *regs)
{
#ifdef CONFIG_SUPPRESS_INTERRUPTS
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
PANIC(); /* Doesn't return */
return regs; /* To keep the compiler happy */
#else
uint32_t *ret;
int irq;
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
/* Get the IRQ number */
@@ -198,7 +198,7 @@ uint32_t *irq_handler(uint32_t *regs)
/* Dispatch the interrupt */
ret = common_handler(irq, regs);
- up_ledoff(LED_INIRQ);
+ board_led_off(LED_INIRQ);
return ret;
#endif
}
diff --git a/nuttx/arch/z16/src/common/up_allocateheap.c b/nuttx/arch/z16/src/common/up_allocateheap.c
index b13740011..af3b06713 100644
--- a/nuttx/arch/z16/src/common/up_allocateheap.c
+++ b/nuttx/arch/z16/src/common/up_allocateheap.c
@@ -98,7 +98,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
{
*heap_start = (FAR void*)CONFIG_HEAP1_BASE;
*heap_size = CONFIG_HEAP1_END - CONFIG_HEAP1_BASE;
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
}
/****************************************************************************
diff --git a/nuttx/arch/z16/src/common/up_assert.c b/nuttx/arch/z16/src/common/up_assert.c
index c5efc174a..454df8023 100644
--- a/nuttx/arch/z16/src/common/up_assert.c
+++ b/nuttx/arch/z16/src/common/up_assert.c
@@ -87,9 +87,9 @@ static void _up_assert(int errorcode) /* noreturn_function */
for(;;)
{
#ifdef CONFIG_ARCH_LEDS
- up_ledon(LED_PANIC);
+ board_led_on(LED_PANIC);
up_mdelay(250);
- up_ledoff(LED_PANIC);
+ board_led_off(LED_PANIC);
up_mdelay(250);
#endif
}
@@ -118,7 +118,7 @@ void up_assert(void)
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
#ifdef CONFIG_HAVE_FILENAME
#if CONFIG_TASK_NAME_SIZE > 0
diff --git a/nuttx/arch/z16/src/common/up_createstack.c b/nuttx/arch/z16/src/common/up_createstack.c
index 69a413bde..bdb6d2647 100644
--- a/nuttx/arch/z16/src/common/up_createstack.c
+++ b/nuttx/arch/z16/src/common/up_createstack.c
@@ -191,7 +191,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
- up_ledon(LED_STACKCREATED);
+ board_led_on(LED_STACKCREATED);
return OK;
}
diff --git a/nuttx/arch/z16/src/common/up_doirq.c b/nuttx/arch/z16/src/common/up_doirq.c
index fea0a86d2..1009814ce 100644
--- a/nuttx/arch/z16/src/common/up_doirq.c
+++ b/nuttx/arch/z16/src/common/up_doirq.c
@@ -82,7 +82,7 @@ FAR chipreg_t *up_doirq(int irq, FAR chipreg_t *regs)
{
FAR chipreg_t *ret = regs;
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
#ifdef CONFIG_SUPPRESS_INTERRUPTS
PANIC();
#else
@@ -130,7 +130,7 @@ FAR chipreg_t *up_doirq(int irq, FAR chipreg_t *regs)
up_enable_irq(irq);
}
- up_ledoff(LED_INIRQ);
+ board_led_off(LED_INIRQ);
#endif
return ret;
diff --git a/nuttx/arch/z16/src/common/up_idle.c b/nuttx/arch/z16/src/common/up_idle.c
index 58cd1afc6..fa636a778 100644
--- a/nuttx/arch/z16/src/common/up_idle.c
+++ b/nuttx/arch/z16/src/common/up_idle.c
@@ -87,11 +87,11 @@ void up_idle(void)
g_ledtoggle++;
if (g_ledtoggle == 0x80)
{
- up_ledon(LED_IDLE);
+ board_led_on(LED_IDLE);
}
else if (g_ledtoggle == 0x00)
{
- up_ledoff(LED_IDLE);
+ board_led_off(LED_IDLE);
}
#endif
diff --git a/nuttx/arch/z16/src/common/up_initialize.c b/nuttx/arch/z16/src/common/up_initialize.c
index 27784101c..0b27aa0cc 100644
--- a/nuttx/arch/z16/src/common/up_initialize.c
+++ b/nuttx/arch/z16/src/common/up_initialize.c
@@ -191,5 +191,5 @@ void up_initialize(void)
/* Initialize the network */
up_netinitialize();
- up_ledon(LED_IRQSENABLED);
+ board_led_on(LED_IRQSENABLED);
}
diff --git a/nuttx/arch/z16/src/common/up_internal.h b/nuttx/arch/z16/src/common/up_internal.h
index e4dfd1dd5..7822a211b 100644
--- a/nuttx/arch/z16/src/common/up_internal.h
+++ b/nuttx/arch/z16/src/common/up_internal.h
@@ -185,13 +185,13 @@ extern void up_maskack_irq(int irq);
/* Defined in board/up_leds.c */
#ifdef CONFIG_ARCH_LEDS
-extern void up_ledinit(void);
-extern void up_ledon(int led);
-extern void up_ledoff(int led);
+extern void board_led_initialize(void);
+extern void board_led_on(int led);
+extern void board_led_off(int led);
#else
-# define up_ledinit()
-# define up_ledon(led)
-# define up_ledoff(led)
+# define board_led_initialize()
+# define board_led_on(led)
+# define board_led_off(led)
#endif
/* Defined in board/up_network.c */
diff --git a/nuttx/arch/z16/src/common/up_sigdeliver.c b/nuttx/arch/z16/src/common/up_sigdeliver.c
index 8f5118798..bc72fd56a 100644
--- a/nuttx/arch/z16/src/common/up_sigdeliver.c
+++ b/nuttx/arch/z16/src/common/up_sigdeliver.c
@@ -93,7 +93,7 @@ void up_sigdeliver(void)
int saved_errno = rtcb->pterrno;
- up_ledon(LED_SIGNAL);
+ board_led_on(LED_SIGNAL);
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
@@ -136,7 +136,7 @@ void up_sigdeliver(void)
/* Then restore the correct state for this thread of execution. */
- up_ledoff(LED_SIGNAL);
+ board_led_off(LED_SIGNAL);
SIGNAL_RETURN(regs);
#endif
}
diff --git a/nuttx/arch/z16/src/z16f/z16f_head.S b/nuttx/arch/z16/src/z16f/z16f_head.S
index 5c31de8f2..c1a69a18e 100755
--- a/nuttx/arch/z16/src/z16f/z16f_head.S
+++ b/nuttx/arch/z16/src/z16f/z16f_head.S
@@ -54,7 +54,7 @@
xref _z16f_clkinit:EROM
xref _z16f_lowinit:EROM
#ifdef CONFIG_ARCH_LEDS
- xref _up_ledinit:EROM
+ xref _board_led_initialize:EROM
#endif
#if defined(USE_LOWUARTINIT)
xref _z16f_lowuartinit:EROM
@@ -158,7 +158,7 @@ _z16f_reset:
/* Initialize onboard LEDs */
#ifdef CONFIG_ARCH_LEDS
- call _up_ledinit
+ call _board_led_initialize
#endif
/* Perform VERY early UART initialization so that we can use it here */
diff --git a/nuttx/arch/z80/src/common/up_allocateheap.c b/nuttx/arch/z80/src/common/up_allocateheap.c
index c3e06ef12..8a6095d51 100644
--- a/nuttx/arch/z80/src/common/up_allocateheap.c
+++ b/nuttx/arch/z80/src/common/up_allocateheap.c
@@ -100,7 +100,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
{
*heap_start = (FAR void*)CONFIG_HEAP1_BASE;
*heap_size = CONFIG_HEAP1_END - CONFIG_HEAP1_BASE;
- up_ledon(LED_HEAPALLOCATE);
+ board_led_on(LED_HEAPALLOCATE);
}
/****************************************************************************
diff --git a/nuttx/arch/z80/src/common/up_assert.c b/nuttx/arch/z80/src/common/up_assert.c
index 644aa5c7a..317b5a05b 100644
--- a/nuttx/arch/z80/src/common/up_assert.c
+++ b/nuttx/arch/z80/src/common/up_assert.c
@@ -87,9 +87,9 @@ static void _up_assert(int errorcode) /* noreturn_function */
for(;;)
{
#ifdef CONFIG_ARCH_LEDS
- up_ledon(LED_PANIC);
+ board_led_on(LED_PANIC);
up_mdelay(250);
- up_ledoff(LED_PANIC);
+ board_led_off(LED_PANIC);
up_mdelay(250);
#endif
}
@@ -118,7 +118,7 @@ void up_assert(void)
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
#ifdef CONFIG_HAVE_FILENAME
#if CONFIG_TASK_NAME_SIZE > 0
diff --git a/nuttx/arch/z80/src/common/up_createstack.c b/nuttx/arch/z80/src/common/up_createstack.c
index a36a8aa7b..4e4c458e8 100644
--- a/nuttx/arch/z80/src/common/up_createstack.c
+++ b/nuttx/arch/z80/src/common/up_createstack.c
@@ -191,7 +191,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
tcb->adj_stack_size = size_of_stack;
- up_ledon(LED_STACKCREATED);
+ board_led_on(LED_STACKCREATED);
return OK;
}
diff --git a/nuttx/arch/z80/src/common/up_doirq.c b/nuttx/arch/z80/src/common/up_doirq.c
index 231e787ca..947a02401 100644
--- a/nuttx/arch/z80/src/common/up_doirq.c
+++ b/nuttx/arch/z80/src/common/up_doirq.c
@@ -72,7 +72,7 @@
FAR chipreg_t *up_doirq(uint8_t irq, FAR chipreg_t *regs)
{
- up_ledon(LED_INIRQ);
+ board_led_on(LED_INIRQ);
#ifdef CONFIG_SUPPRESS_INTERRUPTS
@@ -103,7 +103,7 @@ FAR chipreg_t *up_doirq(uint8_t irq, FAR chipreg_t *regs)
IRQ_LEAVE(irq);
}
- up_ledoff(LED_INIRQ);
+ board_led_off(LED_INIRQ);
return regs;
#endif
}
diff --git a/nuttx/arch/z80/src/common/up_idle.c b/nuttx/arch/z80/src/common/up_idle.c
index 938a150a0..4e50c34db 100644
--- a/nuttx/arch/z80/src/common/up_idle.c
+++ b/nuttx/arch/z80/src/common/up_idle.c
@@ -87,11 +87,11 @@ void up_idle(void)
g_ledtoggle++;
if (g_ledtoggle == 0x80)
{
- up_ledon(LED_IDLE);
+ board_led_on(LED_IDLE);
}
else if (g_ledtoggle == 0x00)
{
- up_ledoff(LED_IDLE);
+ board_led_off(LED_IDLE);
}
#endif
diff --git a/nuttx/arch/z80/src/common/up_initialize.c b/nuttx/arch/z80/src/common/up_initialize.c
index 9d9cd956b..8b4717a9b 100644
--- a/nuttx/arch/z80/src/common/up_initialize.c
+++ b/nuttx/arch/z80/src/common/up_initialize.c
@@ -175,5 +175,5 @@ void up_initialize(void)
/* Initialize the netwok */
up_netinitialize();
- up_ledon(LED_IRQSENABLED);
+ board_led_on(LED_IRQSENABLED);
}
diff --git a/nuttx/arch/z80/src/common/up_internal.h b/nuttx/arch/z80/src/common/up_internal.h
index 36e1ac141..a4fe041bc 100644
--- a/nuttx/arch/z80/src/common/up_internal.h
+++ b/nuttx/arch/z80/src/common/up_internal.h
@@ -187,13 +187,13 @@ void up_timerinit(void);
/* Defined in board/up_leds.c */
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void);
-void up_ledon(int led);
-void up_ledoff(int led);
+void board_led_initialize(void);
+void board_led_on(int led);
+void board_led_off(int led);
#else
-# define up_ledinit()
-# define up_ledon(led)
-# define up_ledoff(led)
+# define board_led_initialize()
+# define board_led_on(led)
+# define board_led_off(led)
#endif
/* Architecture specific hook into the timer interrupt handler */
diff --git a/nuttx/arch/z80/src/ez80/ez80_sigdeliver.c b/nuttx/arch/z80/src/ez80/ez80_sigdeliver.c
index aeb2d6316..7280835d1 100644
--- a/nuttx/arch/z80/src/ez80/ez80_sigdeliver.c
+++ b/nuttx/arch/z80/src/ez80/ez80_sigdeliver.c
@@ -92,7 +92,7 @@ void up_sigdeliver(void)
int saved_errno = rtcb->pterrno;
- up_ledon(LED_SIGNAL);
+ board_led_on(LED_SIGNAL);
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
@@ -134,7 +134,7 @@ void up_sigdeliver(void)
* execution.
*/
- up_ledoff(LED_SIGNAL);
+ board_led_off(LED_SIGNAL);
ez80_restorecontext(regs);
#endif
}
diff --git a/nuttx/arch/z80/src/z180/z180_sigdeliver.c b/nuttx/arch/z80/src/z180/z180_sigdeliver.c
index eb3fa8e2c..bd28980de 100644
--- a/nuttx/arch/z80/src/z180/z180_sigdeliver.c
+++ b/nuttx/arch/z80/src/z180/z180_sigdeliver.c
@@ -91,7 +91,7 @@ void up_sigdeliver(void)
int saved_errno = rtcb->pterrno;
- up_ledon(LED_SIGNAL);
+ board_led_on(LED_SIGNAL);
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
@@ -131,7 +131,7 @@ void up_sigdeliver(void)
/* Then restore the correct state for this thread of execution. */
- up_ledoff(LED_SIGNAL);
+ board_led_off(LED_SIGNAL);
z180_restoreusercontext(regs);
#endif
}
diff --git a/nuttx/arch/z80/src/z8/z8_head.S b/nuttx/arch/z80/src/z8/z8_head.S
index 7fcd90504..bdd6593e0 100755
--- a/nuttx/arch/z80/src/z8/z8_head.S
+++ b/nuttx/arch/z80/src/z8/z8_head.S
@@ -68,7 +68,7 @@
xref _z16f_clkinit:ROM
xref _z16f_lowinit:ROM
#ifdef CONFIG_ARCH_LEDS
- xref _up_ledinit:ROM
+ xref _board_led_initialize:ROM
#endif
xref _os_start:ROM
xref _up_doirq:ROM
diff --git a/nuttx/arch/z80/src/z8/z8_sigdeliver.c b/nuttx/arch/z80/src/z8/z8_sigdeliver.c
index 50b81a202..b2e11b080 100644
--- a/nuttx/arch/z80/src/z8/z8_sigdeliver.c
+++ b/nuttx/arch/z80/src/z8/z8_sigdeliver.c
@@ -106,7 +106,7 @@ void up_sigdeliver(void)
int saved_errno = rtcb->pterrno;
- up_ledon(LED_SIGNAL);
+ board_led_on(LED_SIGNAL);
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
@@ -146,7 +146,7 @@ void up_sigdeliver(void)
/* Then restore the correct state for this thread of execution. */
- up_ledoff(LED_SIGNAL);
+ board_led_off(LED_SIGNAL);
z8_restorecontext(regs);
#endif
}
diff --git a/nuttx/arch/z80/src/z80/z80_sigdeliver.c b/nuttx/arch/z80/src/z80/z80_sigdeliver.c
index 3eacd6467..c6355097f 100644
--- a/nuttx/arch/z80/src/z80/z80_sigdeliver.c
+++ b/nuttx/arch/z80/src/z80/z80_sigdeliver.c
@@ -91,7 +91,7 @@ void up_sigdeliver(void)
int saved_errno = rtcb->pterrno;
- up_ledon(LED_SIGNAL);
+ board_led_on(LED_SIGNAL);
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
@@ -131,7 +131,7 @@ void up_sigdeliver(void)
/* Then restore the correct state for this thread of execution. */
- up_ledoff(LED_SIGNAL);
+ board_led_off(LED_SIGNAL);
z80_restoreusercontext(regs);
#endif
}
diff --git a/nuttx/configs/16z/src/z16f_leds.c b/nuttx/configs/16z/src/z16f_leds.c
index dc345cee4..483ec1662 100644
--- a/nuttx/configs/16z/src/z16f_leds.c
+++ b/nuttx/configs/16z/src/z16f_leds.c
@@ -93,20 +93,20 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* All GPIO initialization is done in up_lowinit() */
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
#if defined(HAVE_16Z_LED3) || defined(HAVE_16Z_LED4)
/* The following operations must be atomic */
@@ -138,10 +138,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
#if defined(HAVE_16Z_LED3) || defined(HAVE_16Z_LED4)
/* The following operations must be atomic */
diff --git a/nuttx/configs/arduino-due/src/arduino-due.h b/nuttx/configs/arduino-due/src/arduino-due.h
index 0430b8d2d..00fbbe352 100644
--- a/nuttx/configs/arduino-due/src/arduino-due.h
+++ b/nuttx/configs/arduino-due/src/arduino-due.h
@@ -321,11 +321,11 @@ void sam_sram_initialize(void);
#endif
/************************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
************************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void);
+void board_led_initialize(void);
#endif
/****************************************************************************
diff --git a/nuttx/configs/arduino-due/src/sam_autoleds.c b/nuttx/configs/arduino-due/src/sam_autoleds.c
index e0d7302a8..e88aa059d 100644
--- a/nuttx/configs/arduino-due/src/sam_autoleds.c
+++ b/nuttx/configs/arduino-due/src/sam_autoleds.c
@@ -116,10 +116,10 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure RX and TX LED GPIOs for output */
@@ -129,10 +129,10 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
switch (led)
{
@@ -178,10 +178,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
switch (led)
{
diff --git a/nuttx/configs/arduino-due/src/sam_boot.c b/nuttx/configs/arduino-due/src/sam_boot.c
index a09e7545d..7b308b22b 100644
--- a/nuttx/configs/arduino-due/src/sam_boot.c
+++ b/nuttx/configs/arduino-due/src/sam_boot.c
@@ -70,6 +70,6 @@ void sam_boardinitialize(void)
#ifdef CONFIG_ARCH_LEDS
/* Configure on-board LEDs if LED support has been selected. */
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/avr32dev1/src/avr32dev1_internal.h b/nuttx/configs/avr32dev1/src/avr32dev1_internal.h
index 31561c881..eac54f414 100644
--- a/nuttx/configs/avr32dev1/src/avr32dev1_internal.h
+++ b/nuttx/configs/avr32dev1/src/avr32dev1_internal.h
@@ -112,14 +112,14 @@
************************************************************************************/
/************************************************************************************
- * Name: up_ledinitialize
+ * Name: board_led_initializeialize
*
* Description:
* Configure on-board LEDs if LED support has been selected.
************************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-extern void up_ledinitialize(void);
+extern void board_led_initializeialize(void);
#endif
#endif /* __ASSEMBLY__ */
diff --git a/nuttx/configs/avr32dev1/src/up_boot.c b/nuttx/configs/avr32dev1/src/up_boot.c
index 587168853..317954213 100644
--- a/nuttx/configs/avr32dev1/src/up_boot.c
+++ b/nuttx/configs/avr32dev1/src/up_boot.c
@@ -79,6 +79,6 @@ void up_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinitialize();
+ board_led_initializeialize();
#endif
}
diff --git a/nuttx/configs/avr32dev1/src/up_leds.c b/nuttx/configs/avr32dev1/src/up_leds.c
index 62cde6b21..6106b6532 100644
--- a/nuttx/configs/avr32dev1/src/up_leds.c
+++ b/nuttx/configs/avr32dev1/src/up_leds.c
@@ -62,30 +62,30 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinitialize
+ * Name: board_led_initializeialize
****************************************************************************/
-void up_ledinitialize(void)
+void board_led_initializeialize(void)
{
at32uc3_configgpio(PINMUX_GPIO_LED1);
at32uc3_configgpio(PINMUX_GPIO_LED2);
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
at32uc3_gpiowrite(PINMUX_GPIO_LED1, (led != 0));
at32uc3_gpiowrite(PINMUX_GPIO_LED2, (led == 2));
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
at32uc3_gpiowrite(PINMUX_GPIO_LED1, (led == 2));
at32uc3_gpiowrite(PINMUX_GPIO_LED2, false);
diff --git a/nuttx/configs/c5471evm/src/up_leds.c b/nuttx/configs/c5471evm/src/up_leds.c
index 72811a871..dee08e415 100644
--- a/nuttx/configs/c5471evm/src/up_leds.c
+++ b/nuttx/configs/c5471evm/src/up_leds.c
@@ -63,11 +63,11 @@ static uint32_t g_ledstate;
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Enable access to LEDs */
@@ -80,10 +80,10 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
if (led < 8)
{
@@ -93,10 +93,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
if (led < 8)
{
diff --git a/nuttx/configs/cloudctrl/src/up_autoleds.c b/nuttx/configs/cloudctrl/src/up_autoleds.c
index bc45a2154..c76c94601 100644
--- a/nuttx/configs/cloudctrl/src/up_autoleds.c
+++ b/nuttx/configs/cloudctrl/src/up_autoleds.c
@@ -354,11 +354,11 @@ static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@@ -369,19 +369,19 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
led_setonoff(ON_BITS(g_ledbits[led]));
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
led_setonoff(OFF_BITS(g_ledbits[led]));
}
@@ -398,7 +398,7 @@ void up_ledpminitialize(void)
int ret = pm_register(&g_ledscb);
if (ret != OK)
{
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
}
}
#endif /* CONFIG_PM */
diff --git a/nuttx/configs/cloudctrl/src/up_boot.c b/nuttx/configs/cloudctrl/src/up_boot.c
index fe0093d48..c098e90e9 100644
--- a/nuttx/configs/cloudctrl/src/up_boot.c
+++ b/nuttx/configs/cloudctrl/src/up_boot.c
@@ -98,6 +98,6 @@ void stm32_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/demo9s12ne64/src/demo9s12ne64.h b/nuttx/configs/demo9s12ne64/src/demo9s12ne64.h
index 0a6c8e2c9..e27f8d62d 100644
--- a/nuttx/configs/demo9s12ne64/src/demo9s12ne64.h
+++ b/nuttx/configs/demo9s12ne64/src/demo9s12ne64.h
@@ -64,7 +64,7 @@
* Public Functions
************************************************************************************/
/************************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
*
* Description:
* Configure and initialize on-board LEDs
@@ -72,7 +72,7 @@
************************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-extern void up_ledinit(void);
+extern void board_led_initialize(void);
#endif
/************************************************************************************
diff --git a/nuttx/configs/demo9s12ne64/src/up_boot.c b/nuttx/configs/demo9s12ne64/src/up_boot.c
index a98bb0d90..dfdb4360f 100644
--- a/nuttx/configs/demo9s12ne64/src/up_boot.c
+++ b/nuttx/configs/demo9s12ne64/src/up_boot.c
@@ -84,6 +84,6 @@ void hcs12_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/demo9s12ne64/src/up_leds.c b/nuttx/configs/demo9s12ne64/src/up_leds.c
index 49266aced..39733dcde 100644
--- a/nuttx/configs/demo9s12ne64/src/up_leds.c
+++ b/nuttx/configs/demo9s12ne64/src/up_leds.c
@@ -75,7 +75,7 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
*
* Description:
* Configure and initialize on-board LEDs
@@ -83,23 +83,23 @@
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
}
diff --git a/nuttx/configs/ea3131/src/up_boot.c b/nuttx/configs/ea3131/src/up_boot.c
index 52e0b086c..7d4fe9877 100644
--- a/nuttx/configs/ea3131/src/up_boot.c
+++ b/nuttx/configs/ea3131/src/up_boot.c
@@ -118,7 +118,7 @@ void lpc31_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
/* Set up mass storage device to support on demand paging */
diff --git a/nuttx/configs/ea3131/src/up_clkinit.c b/nuttx/configs/ea3131/src/up_clkinit.c
index 247844a81..6bc7f0e9f 100644
--- a/nuttx/configs/ea3131/src/up_clkinit.c
+++ b/nuttx/configs/ea3131/src/up_clkinit.c
@@ -439,6 +439,6 @@ const struct lpc31_clkinit_s g_boardclks =
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
diff --git a/nuttx/configs/ea3131/src/up_leds.c b/nuttx/configs/ea3131/src/up_leds.c
index 021600cb9..4a0b35d23 100644
--- a/nuttx/configs/ea3131/src/up_leds.c
+++ b/nuttx/configs/ea3131/src/up_leds.c
@@ -80,27 +80,27 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
}
diff --git a/nuttx/configs/ea3152/src/up_boot.c b/nuttx/configs/ea3152/src/up_boot.c
index 13a9d7ed5..db1dc035b 100644
--- a/nuttx/configs/ea3152/src/up_boot.c
+++ b/nuttx/configs/ea3152/src/up_boot.c
@@ -105,7 +105,7 @@ void lpc31_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
/* Set up mass storage device to support on demand paging */
diff --git a/nuttx/configs/ea3152/src/up_clkinit.c b/nuttx/configs/ea3152/src/up_clkinit.c
index 04dfe3411..55ec6da97 100644
--- a/nuttx/configs/ea3152/src/up_clkinit.c
+++ b/nuttx/configs/ea3152/src/up_clkinit.c
@@ -439,6 +439,6 @@ const struct lpc31_clkinit_s g_boardclks =
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
diff --git a/nuttx/configs/ea3152/src/up_leds.c b/nuttx/configs/ea3152/src/up_leds.c
index bbd393beb..1a8c9a613 100644
--- a/nuttx/configs/ea3152/src/up_leds.c
+++ b/nuttx/configs/ea3152/src/up_leds.c
@@ -80,27 +80,27 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
}
diff --git a/nuttx/configs/eagle100/src/eagle100_internal.h b/nuttx/configs/eagle100/src/eagle100_internal.h
index 48da6b9f7..df4ada90a 100644
--- a/nuttx/configs/eagle100/src/eagle100_internal.h
+++ b/nuttx/configs/eagle100/src/eagle100_internal.h
@@ -91,7 +91,7 @@
extern void weak_function lm_ssiinitialize(void);
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
*
* Description:
* Initialize on-board LEDs.
@@ -99,7 +99,7 @@ extern void weak_function lm_ssiinitialize(void);
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-extern void up_ledinit(void);
+extern void board_led_initialize(void);
#endif
#endif /* __ASSEMBLY__ */
diff --git a/nuttx/configs/eagle100/src/up_boot.c b/nuttx/configs/eagle100/src/up_boot.c
index bd46bf288..364e404f6 100644
--- a/nuttx/configs/eagle100/src/up_boot.c
+++ b/nuttx/configs/eagle100/src/up_boot.c
@@ -87,6 +87,6 @@ void lm_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/eagle100/src/up_leds.c b/nuttx/configs/eagle100/src/up_leds.c
index 4976c4bcb..0a5523048 100644
--- a/nuttx/configs/eagle100/src/up_leds.c
+++ b/nuttx/configs/eagle100/src/up_leds.c
@@ -90,7 +90,7 @@
static uint8_t g_nest;
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
*
* Description:
* Initialize on-board LEDs.
@@ -98,23 +98,23 @@ static uint8_t g_nest;
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
leddbg("Initializing\n");
/* Configure Port E, Bit 1 as an output, initial value=OFF */
- led_dumpgpio("up_ledinit before lm_configgpio()");
+ led_dumpgpio("board_led_initialize before lm_configgpio()");
lm_configgpio(LED_GPIO);
- led_dumpgpio("up_ledinit after lm_configgpio()");
+ led_dumpgpio("board_led_initialize after lm_configgpio()");
g_nest = 0;
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
switch (led)
{
@@ -130,18 +130,18 @@ void up_ledon(int led)
g_nest++;
case LED_IRQSENABLED:
case LED_STACKCREATED:
- led_dumpgpio("up_ledon: before lm_gpiowrite()");
+ led_dumpgpio("board_led_on: before lm_gpiowrite()");
lm_gpiowrite(LED_GPIO, false);
- led_dumpgpio("up_ledon: after lm_gpiowrite()");
+ led_dumpgpio("board_led_on: after lm_gpiowrite()");
break;
}
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
switch (led)
{
@@ -158,9 +158,9 @@ void up_ledoff(int led)
case LED_PANIC:
if (--g_nest <= 0)
{
- led_dumpgpio("up_ledoff: before lm_gpiowrite()");
+ led_dumpgpio("board_led_off: before lm_gpiowrite()");
lm_gpiowrite(LED_GPIO, true);
- led_dumpgpio("up_ledoff: after lm_gpiowrite()");
+ led_dumpgpio("board_led_off: after lm_gpiowrite()");
}
break;
}
diff --git a/nuttx/configs/ekk-lm3s9b96/src/up_boot.c b/nuttx/configs/ekk-lm3s9b96/src/up_boot.c
index 312f63adc..4050d1b92 100644
--- a/nuttx/configs/ekk-lm3s9b96/src/up_boot.c
+++ b/nuttx/configs/ekk-lm3s9b96/src/up_boot.c
@@ -87,6 +87,6 @@ void lm_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/ekk-lm3s9b96/src/up_leds.c b/nuttx/configs/ekk-lm3s9b96/src/up_leds.c
index d3c940f5a..4fbb60331 100644
--- a/nuttx/configs/ekk-lm3s9b96/src/up_leds.c
+++ b/nuttx/configs/ekk-lm3s9b96/src/up_leds.c
@@ -91,27 +91,27 @@
static uint8_t g_nest;
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
leddbg("Initializing\n");
/* Configure Port D, Bit 0 as an output, initial value=OFF */
- led_dumpgpio("up_ledinit before lm_configgpio()");
+ led_dumpgpio("board_led_initialize before lm_configgpio()");
lm_configgpio(LED_GPIO);
- led_dumpgpio("up_ledinit after lm_configgpio()");
+ led_dumpgpio("board_led_initialize after lm_configgpio()");
g_nest = 0;
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
switch (led)
{
@@ -127,18 +127,18 @@ void up_ledon(int led)
g_nest++;
case LED_IRQSENABLED:
case LED_STACKCREATED:
- led_dumpgpio("up_ledon: before lm_gpiowrite()");
+ led_dumpgpio("board_led_on: before lm_gpiowrite()");
lm_gpiowrite(LED_GPIO, false);
- led_dumpgpio("up_ledon: after lm_gpiowrite()");
+ led_dumpgpio("board_led_on: after lm_gpiowrite()");
break;
}
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
switch (led)
{
@@ -155,9 +155,9 @@ void up_ledoff(int led)
case LED_PANIC:
if (--g_nest <= 0)
{
- led_dumpgpio("up_ledoff: before lm_gpiowrite()");
+ led_dumpgpio("board_led_off: before lm_gpiowrite()");
lm_gpiowrite(LED_GPIO, true);
- led_dumpgpio("up_ledoff: after lm_gpiowrite()");
+ led_dumpgpio("board_led_off: after lm_gpiowrite()");
}
break;
}
diff --git a/nuttx/configs/ez80f910200kitg/src/ez80_leds.c b/nuttx/configs/ez80f910200kitg/src/ez80_leds.c
index 588410c8e..a162d57cb 100644
--- a/nuttx/configs/ez80f910200kitg/src/ez80_leds.c
+++ b/nuttx/configs/ez80f910200kitg/src/ez80_leds.c
@@ -63,27 +63,27 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
}
#endif /* CONFIG_ARCH_LEDS */
diff --git a/nuttx/configs/ez80f910200zco/src/ez80_leds.c b/nuttx/configs/ez80f910200zco/src/ez80_leds.c
index 7f5af2075..672940c1d 100644
--- a/nuttx/configs/ez80f910200zco/src/ez80_leds.c
+++ b/nuttx/configs/ez80f910200zco/src/ez80_leds.c
@@ -212,11 +212,11 @@ static int8_t g_intcount = 0;
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
g_currglyph = g_chspace;
g_prevglyph = g_chspace;
@@ -225,10 +225,10 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
FAR const uint8_t *tmp = g_currglyph;
switch (led)
@@ -277,10 +277,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
if (led == LED_INIRQ)
{
diff --git a/nuttx/configs/fire-stm32v2/src/up_autoleds.c b/nuttx/configs/fire-stm32v2/src/up_autoleds.c
index 7127b8608..c16ef3208 100644
--- a/nuttx/configs/fire-stm32v2/src/up_autoleds.c
+++ b/nuttx/configs/fire-stm32v2/src/up_autoleds.c
@@ -335,11 +335,11 @@ static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@@ -349,19 +349,19 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
led_setonoff(ON_BITS(g_ledbits[led]));
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
led_setonoff(OFF_BITS(g_ledbits[led]));
}
@@ -378,7 +378,7 @@ void up_ledpminitialize(void)
int ret = pm_register(&g_ledscb);
if (ret != OK)
{
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
}
}
#endif /* CONFIG_PM */
diff --git a/nuttx/configs/fire-stm32v2/src/up_boot.c b/nuttx/configs/fire-stm32v2/src/up_boot.c
index bb87afcdf..6f9d55899 100644
--- a/nuttx/configs/fire-stm32v2/src/up_boot.c
+++ b/nuttx/configs/fire-stm32v2/src/up_boot.c
@@ -97,6 +97,6 @@ void stm32_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/freedom-kl25z/src/kl_led.c b/nuttx/configs/freedom-kl25z/src/kl_led.c
index 12ab55538..c40cf9a9c 100644
--- a/nuttx/configs/freedom-kl25z/src/kl_led.c
+++ b/nuttx/configs/freedom-kl25z/src/kl_led.c
@@ -133,10 +133,10 @@ void kl_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
if (led == LED_STACKCREATED)
{
@@ -153,10 +153,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
if (led == LED_PANIC)
{
diff --git a/nuttx/configs/hymini-stm32v/src/up_boot.c b/nuttx/configs/hymini-stm32v/src/up_boot.c
index db4ad0c81..951238f06 100644
--- a/nuttx/configs/hymini-stm32v/src/up_boot.c
+++ b/nuttx/configs/hymini-stm32v/src/up_boot.c
@@ -98,6 +98,6 @@ void stm32_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/hymini-stm32v/src/up_leds.c b/nuttx/configs/hymini-stm32v/src/up_leds.c
index 8c678cb99..437999d6b 100644
--- a/nuttx/configs/hymini-stm32v/src/up_leds.c
+++ b/nuttx/configs/hymini-stm32v/src/up_leds.c
@@ -207,11 +207,11 @@ static void led_setonoff(unsigned int bits)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED1 & LED2 GPIOs for output */
stm32_configgpio(GPIO_LED1);
@@ -219,19 +219,19 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
led_setonoff(ON_BITS(g_ledbits[led]));
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
led_setonoff(OFF_BITS(g_ledbits[led]));
}
diff --git a/nuttx/configs/kwikstik-k40/src/kwikstik-internal.h b/nuttx/configs/kwikstik-k40/src/kwikstik-internal.h
index 145b62d5f..0a97471af 100644
--- a/nuttx/configs/kwikstik-k40/src/kwikstik-internal.h
+++ b/nuttx/configs/kwikstik-k40/src/kwikstik-internal.h
@@ -159,7 +159,7 @@
************************************************************************************/
/************************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
*
* Description:
* Initialize LED GPIOs so that LEDs can be controlled.
@@ -167,7 +167,7 @@
************************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-extern void up_ledinit(void);
+extern void board_led_initialize(void);
#endif
/************************************************************************************
diff --git a/nuttx/configs/kwikstik-k40/src/up_boot.c b/nuttx/configs/kwikstik-k40/src/up_boot.c
index cf5bba4e7..bac24ab54 100644
--- a/nuttx/configs/kwikstik-k40/src/up_boot.c
+++ b/nuttx/configs/kwikstik-k40/src/up_boot.c
@@ -97,6 +97,6 @@ void kinetis_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/kwikstik-k40/src/up_leds.c b/nuttx/configs/kwikstik-k40/src/up_leds.c
index 71a02df63..07531aa26 100644
--- a/nuttx/configs/kwikstik-k40/src/up_leds.c
+++ b/nuttx/configs/kwikstik-k40/src/up_leds.c
@@ -71,7 +71,7 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
*
* Description:
* Initialize LED GPIOs so that LEDs can be controlled.
@@ -79,25 +79,25 @@
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* The KwikStik-K40 board has no MCU driven, GPIO-based LEDs */
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
/* The KwikStik-K40 board has no MCU driven, GPIO-based LEDs */
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
/* The KwikStik-K40 board has no MCU driven, GPIO-based LEDs */
}
diff --git a/nuttx/configs/lincoln60/src/up_boot.c b/nuttx/configs/lincoln60/src/up_boot.c
index 6e67f777b..4acae0b02 100644
--- a/nuttx/configs/lincoln60/src/up_boot.c
+++ b/nuttx/configs/lincoln60/src/up_boot.c
@@ -76,6 +76,6 @@ void lpc17_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/lincoln60/src/up_leds.c b/nuttx/configs/lincoln60/src/up_leds.c
index d0b2016ca..59fb8f049 100644
--- a/nuttx/configs/lincoln60/src/up_leds.c
+++ b/nuttx/configs/lincoln60/src/up_leds.c
@@ -118,26 +118,26 @@ static int g_nestcount;
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure all LED GPIO lines */
- led_dumpgpio("up_ledinit() Entry)");
+ led_dumpgpio("board_led_initialize() Entry)");
lpc17_configgpio(LINCOLN60_LED1);
lpc17_configgpio(LINCOLN60_LED2);
- led_dumpgpio("up_ledinit() Exit");
+ led_dumpgpio("board_led_initialize() Exit");
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
/* We will control LED1 and LED2 not yet completed the boot sequence. */
@@ -181,10 +181,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
/* In all states, OFF can only mean turning off the HB LED */
diff --git a/nuttx/configs/lm3s6432-s2e/src/up_boot.c b/nuttx/configs/lm3s6432-s2e/src/up_boot.c
index 60be9c3cf..4376b8db9 100644
--- a/nuttx/configs/lm3s6432-s2e/src/up_boot.c
+++ b/nuttx/configs/lm3s6432-s2e/src/up_boot.c
@@ -92,7 +92,7 @@ void lm_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
/* Configure serial transciever */
diff --git a/nuttx/configs/lm3s6432-s2e/src/up_leds.c b/nuttx/configs/lm3s6432-s2e/src/up_leds.c
index a159cbb50..715b4a19e 100644
--- a/nuttx/configs/lm3s6432-s2e/src/up_leds.c
+++ b/nuttx/configs/lm3s6432-s2e/src/up_leds.c
@@ -90,28 +90,28 @@
static uint8_t g_nest;
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
leddbg("Initializing\n");
/* Configure Port F, Bit 2 as an output, initial value=OFF */
- led_dumpgpio("up_ledinit before lm_configgpio()");
+ led_dumpgpio("board_led_initialize before lm_configgpio()");
lm_configgpio(LED0_GPIO);
lm_configgpio(LED1_GPIO);
- led_dumpgpio("up_ledinit after lm_configgpio()");
+ led_dumpgpio("board_led_initialize after lm_configgpio()");
g_nest = 0;
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
switch (led)
{
@@ -127,18 +127,18 @@ void up_ledon(int led)
g_nest++;
case LED_IRQSENABLED:
case LED_STACKCREATED:
- led_dumpgpio("up_ledon: before lm_gpiowrite()");
+ led_dumpgpio("board_led_on: before lm_gpiowrite()");
lm_gpiowrite(LED1_GPIO, false);
- led_dumpgpio("up_ledon: after lm_gpiowrite()");
+ led_dumpgpio("board_led_on: after lm_gpiowrite()");
break;
}
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
switch (led)
{
@@ -155,9 +155,9 @@ void up_ledoff(int led)
case LED_PANIC:
if (--g_nest <= 0)
{
- led_dumpgpio("up_ledoff: before lm_gpiowrite()");
+ led_dumpgpio("board_led_off: before lm_gpiowrite()");
lm_gpiowrite(LED1_GPIO, true);
- led_dumpgpio("up_ledoff: after lm_gpiowrite()");
+ led_dumpgpio("board_led_off: after lm_gpiowrite()");
}
break;
}
diff --git a/nuttx/configs/lm3s6965-ek/src/up_boot.c b/nuttx/configs/lm3s6965-ek/src/up_boot.c
index 6229a2a59..3efd2434d 100644
--- a/nuttx/configs/lm3s6965-ek/src/up_boot.c
+++ b/nuttx/configs/lm3s6965-ek/src/up_boot.c
@@ -88,6 +88,6 @@ void lm_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/lm3s6965-ek/src/up_leds.c b/nuttx/configs/lm3s6965-ek/src/up_leds.c
index 6139a7922..e6ca445d6 100644
--- a/nuttx/configs/lm3s6965-ek/src/up_leds.c
+++ b/nuttx/configs/lm3s6965-ek/src/up_leds.c
@@ -90,27 +90,27 @@
static uint8_t g_nest;
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
leddbg("Initializing\n");
/* Configure Port E, Bit 1 as an output, initial value=OFF */
- led_dumpgpio("up_ledinit before lm_configgpio()");
+ led_dumpgpio("board_led_initialize before lm_configgpio()");
lm_configgpio(LED_GPIO);
- led_dumpgpio("up_ledinit after lm_configgpio()");
+ led_dumpgpio("board_led_initialize after lm_configgpio()");
g_nest = 0;
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
switch (led)
{
@@ -126,18 +126,18 @@ void up_ledon(int led)
g_nest++;
case LED_IRQSENABLED:
case LED_STACKCREATED:
- led_dumpgpio("up_ledon: before lm_gpiowrite()");
+ led_dumpgpio("board_led_on: before lm_gpiowrite()");
lm_gpiowrite(LED_GPIO, false);
- led_dumpgpio("up_ledon: after lm_gpiowrite()");
+ led_dumpgpio("board_led_on: after lm_gpiowrite()");
break;
}
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
switch (led)
{
@@ -154,9 +154,9 @@ void up_ledoff(int led)
case LED_PANIC:
if (--g_nest <= 0)
{
- led_dumpgpio("up_ledoff: before lm_gpiowrite()");
+ led_dumpgpio("board_led_off: before lm_gpiowrite()");
lm_gpiowrite(LED_GPIO, true);
- led_dumpgpio("up_ledoff: after lm_gpiowrite()");
+ led_dumpgpio("board_led_off: after lm_gpiowrite()");
}
break;
}
diff --git a/nuttx/configs/lm3s8962-ek/src/up_boot.c b/nuttx/configs/lm3s8962-ek/src/up_boot.c
index 655aa6993..857d1374f 100644
--- a/nuttx/configs/lm3s8962-ek/src/up_boot.c
+++ b/nuttx/configs/lm3s8962-ek/src/up_boot.c
@@ -88,6 +88,6 @@ void lm_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/lm3s8962-ek/src/up_leds.c b/nuttx/configs/lm3s8962-ek/src/up_leds.c
index 5adf27d42..331af44e7 100644
--- a/nuttx/configs/lm3s8962-ek/src/up_leds.c
+++ b/nuttx/configs/lm3s8962-ek/src/up_leds.c
@@ -90,27 +90,27 @@
static uint8_t g_nest;
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
leddbg("Initializing\n");
/* Configure Port E, Bit 1 as an output, initial value=OFF */
- led_dumpgpio("up_ledinit before lm_configgpio()");
+ led_dumpgpio("board_led_initialize before lm_configgpio()");
lm_configgpio(LED_GPIO);
- led_dumpgpio("up_ledinit after lm_configgpio()");
+ led_dumpgpio("board_led_initialize after lm_configgpio()");
g_nest = 0;
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
switch (led)
{
@@ -126,18 +126,18 @@ void up_ledon(int led)
g_nest++;
case LED_IRQSENABLED:
case LED_STACKCREATED:
- led_dumpgpio("up_ledon: before lm_gpiowrite()");
+ led_dumpgpio("board_led_on: before lm_gpiowrite()");
lm_gpiowrite(LED_GPIO, false);
- led_dumpgpio("up_ledon: after lm_gpiowrite()");
+ led_dumpgpio("board_led_on: after lm_gpiowrite()");
break;
}
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
switch (led)
{
@@ -154,9 +154,9 @@ void up_ledoff(int led)
case LED_PANIC:
if (--g_nest <= 0)
{
- led_dumpgpio("up_ledoff: before lm_gpiowrite()");
+ led_dumpgpio("board_led_off: before lm_gpiowrite()");
lm_gpiowrite(LED_GPIO, true);
- led_dumpgpio("up_ledoff: after lm_gpiowrite()");
+ led_dumpgpio("board_led_off: after lm_gpiowrite()");
}
break;
}
diff --git a/nuttx/configs/lm4f120-launchpad/src/lm4f_autoleds.c b/nuttx/configs/lm4f120-launchpad/src/lm4f_autoleds.c
index 8cd548f94..6932994a9 100644
--- a/nuttx/configs/lm4f120-launchpad/src/lm4f_autoleds.c
+++ b/nuttx/configs/lm4f120-launchpad/src/lm4f_autoleds.c
@@ -152,10 +152,10 @@ void lm4f_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
switch (led)
{
@@ -192,10 +192,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
switch (led)
{
diff --git a/nuttx/configs/lpc4330-xplorer/src/up_autoleds.c b/nuttx/configs/lpc4330-xplorer/src/up_autoleds.c
index badeb9a16..23e23245d 100644
--- a/nuttx/configs/lpc4330-xplorer/src/up_autoleds.c
+++ b/nuttx/configs/lpc4330-xplorer/src/up_autoleds.c
@@ -136,14 +136,14 @@ static void led_dumppins(FAR const char *msg)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure all LED pins as GPIO outputs */
- led_dumppins("up_ledinit() Entry)");
+ led_dumppins("board_led_initialize() Entry)");
/* Configure LED pins as GPIOs, then configure GPIOs as outputs */
@@ -153,14 +153,14 @@ void up_ledinit(void)
lpc43_pin_config(PINCONFIG_LED2);
lpc43_gpio_config(GPIO_LED2);
- led_dumppins("up_ledinit() Exit");
+ led_dumppins("board_led_initialize() Exit");
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
switch (led)
{
@@ -182,10 +182,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
switch (led)
{
diff --git a/nuttx/configs/lpc4330-xplorer/src/up_boot.c b/nuttx/configs/lpc4330-xplorer/src/up_boot.c
index 8bd4e019b..ab3a32a5b 100644
--- a/nuttx/configs/lpc4330-xplorer/src/up_boot.c
+++ b/nuttx/configs/lpc4330-xplorer/src/up_boot.c
@@ -76,6 +76,6 @@ void lpc43_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/up_boot.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_boot.c
index 53e4c2a9d..2e09c6bf6 100644
--- a/nuttx/configs/lpcxpresso-lpc1768/src/up_boot.c
+++ b/nuttx/configs/lpcxpresso-lpc1768/src/up_boot.c
@@ -88,6 +88,6 @@ void lpc17_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/up_leds.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_leds.c
index d0dc19727..11abf9def 100644
--- a/nuttx/configs/lpcxpresso-lpc1768/src/up_leds.c
+++ b/nuttx/configs/lpcxpresso-lpc1768/src/up_leds.c
@@ -86,10 +86,10 @@ static bool g_ncstate;
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure all LED GPIO lines */
@@ -98,10 +98,10 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
bool off;
@@ -125,10 +125,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
bool off;
diff --git a/nuttx/configs/maple/src/up_boot.c b/nuttx/configs/maple/src/up_boot.c
index 868e7a6d9..795fa5e7b 100644
--- a/nuttx/configs/maple/src/up_boot.c
+++ b/nuttx/configs/maple/src/up_boot.c
@@ -74,7 +74,7 @@ void stm32_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
/* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function
diff --git a/nuttx/configs/maple/src/up_leds.c b/nuttx/configs/maple/src/up_leds.c
index 638d506e5..0ed4ffcf0 100644
--- a/nuttx/configs/maple/src/up_leds.c
+++ b/nuttx/configs/maple/src/up_leds.c
@@ -87,11 +87,11 @@ static inline void set_led(bool v)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED GPIO for output */
@@ -99,12 +99,12 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
- ledvdbg("up_ledon(%d)\n", led);
+ ledvdbg("board_led_on(%d)\n", led);
switch (led)
{
case LED_STARTED:
@@ -128,12 +128,12 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
- ledvdbg("up_ledoff(%d)\n", led);
+ ledvdbg("board_led_off(%d)\n", led);
switch (led)
{
diff --git a/nuttx/configs/mbed/src/up_boot.c b/nuttx/configs/mbed/src/up_boot.c
index 489c0a58c..2e50e3663 100644
--- a/nuttx/configs/mbed/src/up_boot.c
+++ b/nuttx/configs/mbed/src/up_boot.c
@@ -76,7 +76,7 @@ void lpc17_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/mbed/src/up_leds.c b/nuttx/configs/mbed/src/up_leds.c
index 3a2f160ed..c4c28691a 100644
--- a/nuttx/configs/mbed/src/up_leds.c
+++ b/nuttx/configs/mbed/src/up_leds.c
@@ -119,28 +119,28 @@ static int g_nestcount;
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure all LED GPIO lines */
- led_dumpgpio("up_ledinit() Entry)");
+ led_dumpgpio("board_led_initialize() Entry)");
lpc17_configgpio(MBED_LED1);
lpc17_configgpio(MBED_LED2);
lpc17_configgpio(MBED_LED3);
lpc17_configgpio(MBED_LED4);
- led_dumpgpio("up_ledinit() Exit");
+ led_dumpgpio("board_led_initialize() Exit");
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
/* We will control LED1 and LED2 not yet completed the boot sequence. */
@@ -184,10 +184,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
/* In all states, OFF can only mean turning off the HB LED */
diff --git a/nuttx/configs/mcu123-lpc214x/src/up_leds.c b/nuttx/configs/mcu123-lpc214x/src/up_leds.c
index 9d399c8cc..d5c3e6437 100644
--- a/nuttx/configs/mcu123-lpc214x/src/up_leds.c
+++ b/nuttx/configs/mcu123-lpc214x/src/up_leds.c
@@ -82,11 +82,11 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Initilize GIOs P1.16-P1.23 */
@@ -96,19 +96,19 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
putled(LEDBIT(led),LED_CLR_OFFSET);
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
putled(LEDBIT(led),LED_SET_OFFSET);
}
diff --git a/nuttx/configs/mikroe-stm32f4/src/up_idle.c b/nuttx/configs/mikroe-stm32f4/src/up_idle.c
index d91452722..71928876f 100644
--- a/nuttx/configs/mikroe-stm32f4/src/up_idle.c
+++ b/nuttx/configs/mikroe-stm32f4/src/up_idle.c
@@ -67,8 +67,8 @@
*/
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
-# define BEGIN_IDLE() up_ledon(LED_IDLE)
-# define END_IDLE() up_ledoff(LED_IDLE)
+# define BEGIN_IDLE() board_led_on(LED_IDLE)
+# define END_IDLE() board_led_off(LED_IDLE)
#else
# define BEGIN_IDLE()
# define END_IDLE()
diff --git a/nuttx/configs/mirtoo/src/up_leds.c b/nuttx/configs/mirtoo/src/up_leds.c
index ff9fbc9db..f87cf7b5b 100644
--- a/nuttx/configs/mirtoo/src/up_leds.c
+++ b/nuttx/configs/mirtoo/src/up_leds.c
@@ -230,11 +230,11 @@ void pic32mx_setleds(uint8_t ledset)
#endif
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledon(int led)
+void board_led_on(int led)
{
if ((unsigned)led < LED_NVALUES)
{
@@ -244,11 +244,11 @@ void up_ledon(int led)
#endif
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledoff(int led)
+void board_led_off(int led)
{
if ((unsigned)led < LED_NVALUES)
{
diff --git a/nuttx/configs/mx1ads/src/up_leds.c b/nuttx/configs/mx1ads/src/up_leds.c
index 30ba2bdbe..dea288a06 100644
--- a/nuttx/configs/mx1ads/src/up_leds.c
+++ b/nuttx/configs/mx1ads/src/up_leds.c
@@ -59,11 +59,11 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure Port A, Bit 2 as an output, initial value=1 */
@@ -71,10 +71,10 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
switch (led)
{
@@ -96,10 +96,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
imxgpio_clroutput(GPIOA, 2); /* Port A, Bit 2 = 0 */
}
diff --git a/nuttx/configs/ne64badge/src/ne64badge_internal.h b/nuttx/configs/ne64badge/src/ne64badge_internal.h
index d10618c9a..aee3fc67d 100644
--- a/nuttx/configs/ne64badge/src/ne64badge_internal.h
+++ b/nuttx/configs/ne64badge/src/ne64badge_internal.h
@@ -178,7 +178,7 @@
* Public Functions
************************************************************************************/
/************************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
*
* Description:
* Configure and initialize on-board LEDs
@@ -186,7 +186,7 @@
************************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-extern void up_ledinit(void);
+extern void board_led_initialize(void);
#endif
/************************************************************************************
diff --git a/nuttx/configs/ne64badge/src/up_boot.c b/nuttx/configs/ne64badge/src/up_boot.c
index a1d0071d9..888eaf582 100644
--- a/nuttx/configs/ne64badge/src/up_boot.c
+++ b/nuttx/configs/ne64badge/src/up_boot.c
@@ -84,6 +84,6 @@ void hcs12_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/ne64badge/src/up_leds.c b/nuttx/configs/ne64badge/src/up_leds.c
index d4aab0d3b..9d2b714cc 100644
--- a/nuttx/configs/ne64badge/src/up_leds.c
+++ b/nuttx/configs/ne64badge/src/up_leds.c
@@ -89,30 +89,30 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
*
* Description:
* Configure and initialize on-board LEDs
*
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure all LED GPIO lines */
- led_dumpgpio("up_ledinit() Entry)");
+ led_dumpgpio("board_led_initialize() Entry)");
hcs12_configgpio(NE64BADGE_LED1);
hcs12_configgpio(NE64BADGE_LED2);
- led_dumpgpio("up_ledinit() Exit");
+ led_dumpgpio("board_led_initialize() Exit");
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
switch (led)
{
@@ -134,10 +134,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
switch (led)
{
diff --git a/nuttx/configs/ntosd-dm320/src/up_leds.c b/nuttx/configs/ntosd-dm320/src/up_leds.c
index 9e2336e36..0c47e0510 100644
--- a/nuttx/configs/ntosd-dm320/src/up_leds.c
+++ b/nuttx/configs/ntosd-dm320/src/up_leds.c
@@ -58,11 +58,11 @@
************************************************************************/
/************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
GIO_OUTPUT(GIO_LED_GREEN);
GIO_OUTPUT(GIO_LED_RED);
@@ -71,10 +71,10 @@ void up_ledinit(void)
}
/************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
if (led == GIO_LED_GREEN)
{
@@ -87,10 +87,10 @@ void up_ledon(int led)
}
/************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
if (led == GIO_LED_GREEN)
{
diff --git a/nuttx/configs/nucleus2g/src/up_boot.c b/nuttx/configs/nucleus2g/src/up_boot.c
index ee2855c2f..ce50c8827 100644
--- a/nuttx/configs/nucleus2g/src/up_boot.c
+++ b/nuttx/configs/nucleus2g/src/up_boot.c
@@ -106,7 +106,7 @@ void lpc17_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
/* Configure the relay outptus for use on the BMS master board */
diff --git a/nuttx/configs/nucleus2g/src/up_leds.c b/nuttx/configs/nucleus2g/src/up_leds.c
index a3d4569cc..1f5ac96a8 100644
--- a/nuttx/configs/nucleus2g/src/up_leds.c
+++ b/nuttx/configs/nucleus2g/src/up_leds.c
@@ -118,14 +118,14 @@ static int g_nestcount;
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure all LED GPIO lines */
- led_dumpgpio("up_ledinit() Entry)");
+ led_dumpgpio("board_led_initialize() Entry)");
lpc17_configgpio(NUCLEUS2G_LED1_A);
lpc17_configgpio(NUCLEUS2G_LED1_B);
@@ -134,14 +134,14 @@ void up_ledinit(void)
lpc17_configgpio(NUCLEUS2G_HEARTBEAT);
lpc17_configgpio(NUCLEUS2G_EXTRA_LED);
- led_dumpgpio("up_ledinit() Exit");
+ led_dumpgpio("board_led_initialize() Exit");
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
/* We will control LED1 and LED2 not yet completed the boot sequence. */
@@ -185,10 +185,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
/* In all states, OFF can only mean turning off the HB LED */
diff --git a/nuttx/configs/nutiny-nuc120/src/nuc_led.c b/nuttx/configs/nutiny-nuc120/src/nuc_led.c
index 64c34ad2b..c39bee5de 100644
--- a/nuttx/configs/nutiny-nuc120/src/nuc_led.c
+++ b/nuttx/configs/nutiny-nuc120/src/nuc_led.c
@@ -128,19 +128,19 @@ void nuc_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
nuc_gpiowrite(GPIO_LED, false);
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
nuc_gpiowrite(GPIO_LED, true);
}
diff --git a/nuttx/configs/olimex-lpc-h3131/src/lpc31_boot.c b/nuttx/configs/olimex-lpc-h3131/src/lpc31_boot.c
index efaa21134..b3ac6ce7e 100644
--- a/nuttx/configs/olimex-lpc-h3131/src/lpc31_boot.c
+++ b/nuttx/configs/olimex-lpc-h3131/src/lpc31_boot.c
@@ -113,5 +113,5 @@ void lpc31_boardinitialize(void)
/* Configure on-board LEDs in all cases */
- up_ledinit();
+ board_led_initialize();
}
diff --git a/nuttx/configs/olimex-lpc-h3131/src/lpc31_leds.c b/nuttx/configs/olimex-lpc-h3131/src/lpc31_leds.c
index 5f4a94c5d..e0c7dce56 100644
--- a/nuttx/configs/olimex-lpc-h3131/src/lpc31_leds.c
+++ b/nuttx/configs/olimex-lpc-h3131/src/lpc31_leds.c
@@ -81,14 +81,14 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
*
* Description:
* Configure LEDs. LEDs are left in the OFF state.
*
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Turn off both LEDs */
@@ -97,7 +97,7 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
*
* Description:
* Select the "logical" ON state:
@@ -118,7 +118,7 @@ void up_ledinit(void)
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledon(int led)
+void board_led_on(int led)
{
switch (led)
{
@@ -143,7 +143,7 @@ void up_ledon(int led)
#endif
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
*
* Description:
* Select the "logical" OFF state:
@@ -164,7 +164,7 @@ void up_ledon(int led)
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledoff(int led)
+void board_led_off(int led)
{
switch (led)
{
diff --git a/nuttx/configs/olimex-lpc-h3131/src/lpc_h3131.h b/nuttx/configs/olimex-lpc-h3131/src/lpc_h3131.h
index 4c1e928f8..d7e2951a7 100644
--- a/nuttx/configs/olimex-lpc-h3131/src/lpc_h3131.h
+++ b/nuttx/configs/olimex-lpc-h3131/src/lpc_h3131.h
@@ -206,14 +206,14 @@ int lpc31_mmcsd_initialize(int slot, int minor)
#endif
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
*
* Description:
* Configure LEDs. LEDs are left in the OFF state.
*
****************************************************************************/
-void up_ledinit(void);
+void board_led_initialize(void);
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_OLIMEX_LPC_H3131_SRC_LPC_H3131_H */
diff --git a/nuttx/configs/olimex-lpc1766stk/src/up_boot.c b/nuttx/configs/olimex-lpc1766stk/src/up_boot.c
index 0d265eaad..b3ce10d1a 100644
--- a/nuttx/configs/olimex-lpc1766stk/src/up_boot.c
+++ b/nuttx/configs/olimex-lpc1766stk/src/up_boot.c
@@ -88,6 +88,6 @@ void lpc17_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/olimex-lpc1766stk/src/up_leds.c b/nuttx/configs/olimex-lpc1766stk/src/up_leds.c
index b55d3a76f..b29f24dd2 100644
--- a/nuttx/configs/olimex-lpc1766stk/src/up_leds.c
+++ b/nuttx/configs/olimex-lpc1766stk/src/up_leds.c
@@ -99,23 +99,23 @@ static bool g_uninitialized = true;
****************************************************************************/
/****************************************************************************
- * Name: lpc17_ledinit/up_ledinit
+ * Name: lpc17_ledinit/board_led_initialize
****************************************************************************/
#ifndef CONFIG_ARCH_LEDS
void lpc17_ledinit(void) /* Name when invoked externally */
#else
-void up_ledinit(void) /* Name when invoked via up_boot.c */
+void board_led_initialize(void) /* Name when invoked via up_boot.c */
#endif
{
/* Configure all LED GPIO lines */
- led_dumpgpio("up_ledinit() Entry)");
+ led_dumpgpio("board_led_initialize() Entry)");
lpc17_configgpio(LPC1766STK_LED1);
lpc17_configgpio(LPC1766STK_LED2);
- led_dumpgpio("up_ledinit() Exit");
+ led_dumpgpio("board_led_initialize() Exit");
}
/****************************************************************************
@@ -149,11 +149,11 @@ void lpc17_setleds(uint8_t ledset)
#endif
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledon(int led)
+void board_led_on(int led)
{
switch (led)
{
@@ -181,11 +181,11 @@ void up_ledon(int led)
#endif
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledoff(int led)
+void board_led_off(int led)
{
switch (led)
{
diff --git a/nuttx/configs/olimex-lpc2378/src/up_leds.c b/nuttx/configs/olimex-lpc2378/src/up_leds.c
index a5bb955f5..d936bd1a1 100644
--- a/nuttx/configs/olimex-lpc2378/src/up_leds.c
+++ b/nuttx/configs/olimex-lpc2378/src/up_leds.c
@@ -90,11 +90,11 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Initilize GIOs P1.16-P1.23 */
@@ -104,20 +104,20 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
putled8(~(LEDBIT(led)), LED_MASK_OFFSET);
putled8(LEDBIT(led), LED_SET_OFFSET);
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
putled8(LEDBIT(led), LED_CLR_OFFSET);
}
diff --git a/nuttx/configs/olimex-stm32-p207/src/up_autoleds.c b/nuttx/configs/olimex-stm32-p207/src/up_autoleds.c
index a8128fdc2..5b2108b6e 100644
--- a/nuttx/configs/olimex-stm32-p207/src/up_autoleds.c
+++ b/nuttx/configs/olimex-stm32-p207/src/up_autoleds.c
@@ -147,10 +147,10 @@ static inline void led_setbits(unsigned int setbits)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@@ -161,20 +161,20 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
led_clrbits(BOARD_LED1_BIT | BOARD_LED2_BIT | BOARD_LED3_BIT | BOARD_LED4_BIT);
led_setbits(g_ledbits[led]);
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
led_clrbits(g_ledbits[led]);
}
diff --git a/nuttx/configs/olimex-stm32-p207/src/up_boot.c b/nuttx/configs/olimex-stm32-p207/src/up_boot.c
index 29658ae54..ba0a04b26 100644
--- a/nuttx/configs/olimex-stm32-p207/src/up_boot.c
+++ b/nuttx/configs/olimex-stm32-p207/src/up_boot.c
@@ -84,7 +84,7 @@ void stm32_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
/* Configure on-board BUTTONs if BUTTON support has been selected. */
diff --git a/nuttx/configs/olimex-strp711/src/up_leds.c b/nuttx/configs/olimex-strp711/src/up_leds.c
index 2d099f6bc..a348d5270 100644
--- a/nuttx/configs/olimex-strp711/src/up_leds.c
+++ b/nuttx/configs/olimex-strp711/src/up_leds.c
@@ -97,11 +97,11 @@ static void up_setleds(uint16_t setbits, uint16_t clearbits)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
uint16_t reg16;
@@ -127,10 +127,10 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
/* The Olimex board has only two LEDs, so following states are faked as
* follows
@@ -174,10 +174,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
/* The Olimex board has only two LEDs, so following states are faked as
* follows
diff --git a/nuttx/configs/open1788/src/lpc17_autoleds.c b/nuttx/configs/open1788/src/lpc17_autoleds.c
index a483f5a9a..fb336e1ea 100644
--- a/nuttx/configs/open1788/src/lpc17_autoleds.c
+++ b/nuttx/configs/open1788/src/lpc17_autoleds.c
@@ -248,10 +248,10 @@ static void led_setonoff(unsigned int bits)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@@ -262,19 +262,19 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
led_setonoff(ON_BITS(g_ledbits[led]));
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
led_setonoff(OFF_BITS(g_ledbits[led]));
}
diff --git a/nuttx/configs/open1788/src/lpc17_boardinitialize.c b/nuttx/configs/open1788/src/lpc17_boardinitialize.c
index 0143e58b3..d016f2728 100644
--- a/nuttx/configs/open1788/src/lpc17_boardinitialize.c
+++ b/nuttx/configs/open1788/src/lpc17_boardinitialize.c
@@ -104,7 +104,7 @@ void lpc17_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
/* Configure the LCD GPIOs if LCD support has been selected. */
diff --git a/nuttx/configs/pcduino-a10/src/a1x_leds.c b/nuttx/configs/pcduino-a10/src/a1x_leds.c
index 2596b4518..ae3a70264 100644
--- a/nuttx/configs/pcduino-a10/src/a1x_leds.c
+++ b/nuttx/configs/pcduino-a10/src/a1x_leds.c
@@ -129,7 +129,7 @@ void a1x_led_initialize(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
*
* Description:
* Select the "logical" ON state:
@@ -153,7 +153,7 @@ void a1x_led_initialize(void)
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledon(int led)
+void board_led_on(int led)
{
switch (led)
{
@@ -183,7 +183,7 @@ void up_ledon(int led)
#endif
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
*
* Description:
* Select the "logical" OFF state:
@@ -207,7 +207,7 @@ void up_ledon(int led)
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledoff(int led)
+void board_led_off(int led)
{
switch (led)
{
diff --git a/nuttx/configs/pic32-starterkit/src/up_leds.c b/nuttx/configs/pic32-starterkit/src/up_leds.c
index 85460ae15..71e59343f 100644
--- a/nuttx/configs/pic32-starterkit/src/up_leds.c
+++ b/nuttx/configs/pic32-starterkit/src/up_leds.c
@@ -238,11 +238,11 @@ void pic32mx_setleds(uint8_t ledset)
#endif
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledon(int led)
+void board_led_on(int led)
{
if ((unsigned)led < LED_NVALUES)
{
@@ -252,11 +252,11 @@ void up_ledon(int led)
#endif
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledoff(int led)
+void board_led_off(int led)
{
if ((unsigned)led < LED_NVALUES)
{
diff --git a/nuttx/configs/pic32mx7mmb/src/up_leds.c b/nuttx/configs/pic32mx7mmb/src/up_leds.c
index 573565518..333ca0406 100644
--- a/nuttx/configs/pic32mx7mmb/src/up_leds.c
+++ b/nuttx/configs/pic32mx7mmb/src/up_leds.c
@@ -247,11 +247,11 @@ void pic32mx_setleds(uint8_t ledset)
#endif
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledon(int led)
+void board_led_on(int led)
{
if ((unsigned)led < LED_NVALUES)
{
@@ -261,11 +261,11 @@ void up_ledon(int led)
#endif
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledoff(int led)
+void board_led_off(int led)
{
if ((unsigned)led < LED_NVALUES)
{
diff --git a/nuttx/configs/pjrc-8051/src/up_leds.c b/nuttx/configs/pjrc-8051/src/up_leds.c
index 18e7b461d..f2020b540 100644
--- a/nuttx/configs/pjrc-8051/src/up_leds.c
+++ b/nuttx/configs/pjrc-8051/src/up_leds.c
@@ -119,11 +119,11 @@ static void _up_putnl(void) __naked
************************************************************************/
/************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Set all ports as outputs */
@@ -138,10 +138,10 @@ void up_ledinit(void)
}
/************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
************************************************************************/
-void up_ledon(uint8_t led)
+void board_led_on(uint8_t led)
{
/* This may be called from an interrupt handler */
@@ -172,10 +172,10 @@ void up_ledon(uint8_t led)
}
/************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
************************************************************************/
-void up_ledoff(uint8_t led)
+void board_led_off(uint8_t led)
{
/* This may be called from an interrupt handler */
diff --git a/nuttx/configs/px4fmu-v2_upstream/src/px4fmu2_init.c b/nuttx/configs/px4fmu-v2_upstream/src/px4fmu2_init.c
index 4d0395122..5b6537591 100644
--- a/nuttx/configs/px4fmu-v2_upstream/src/px4fmu2_init.c
+++ b/nuttx/configs/px4fmu-v2_upstream/src/px4fmu2_init.c
@@ -182,7 +182,7 @@ void stm32_boardinitialize(void)
/* Configure LEDs */
- up_ledinit();
+ board_led_initialize();
}
/****************************************************************************
@@ -238,7 +238,7 @@ int nsh_archinitialize(void)
if (!spi1)
{
message("[boot] FAILED to initialize SPI port 1\n");
- up_ledon(LED_AMBER);
+ board_led_on(LED_AMBER);
return -ENODEV;
}
@@ -261,7 +261,7 @@ int nsh_archinitialize(void)
if (!spi2)
{
message("[boot] FAILED to initialize SPI port 2\n");
- up_ledon(LED_AMBER);
+ board_led_on(LED_AMBER);
return -ENODEV;
}
diff --git a/nuttx/configs/qemu-i486/src/up_boot.c b/nuttx/configs/qemu-i486/src/up_boot.c
index bd7646992..391f8f2ad 100644
--- a/nuttx/configs/qemu-i486/src/up_boot.c
+++ b/nuttx/configs/qemu-i486/src/up_boot.c
@@ -77,6 +77,6 @@ void up_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/sam3u-ek/src/sam3u-ek.h b/nuttx/configs/sam3u-ek/src/sam3u-ek.h
index b2fe26e3d..3d81f2fd3 100644
--- a/nuttx/configs/sam3u-ek/src/sam3u-ek.h
+++ b/nuttx/configs/sam3u-ek/src/sam3u-ek.h
@@ -246,11 +246,11 @@ int weak_function sam_hsmciinit(void);
#endif
/************************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
************************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void);
+void board_led_initialize(void);
#endif
/************************************************************************************
diff --git a/nuttx/configs/sam3u-ek/src/up_boot.c b/nuttx/configs/sam3u-ek/src/up_boot.c
index 6892f3c9c..b373b5f71 100644
--- a/nuttx/configs/sam3u-ek/src/up_boot.c
+++ b/nuttx/configs/sam3u-ek/src/up_boot.c
@@ -96,7 +96,7 @@ void sam_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
/* Setup SD card-related PIOs if 1) HSMCI is selected and 2) the weak
diff --git a/nuttx/configs/sam3u-ek/src/up_leds.c b/nuttx/configs/sam3u-ek/src/up_leds.c
index 3a6d09a48..6418ac4ed 100644
--- a/nuttx/configs/sam3u-ek/src/up_leds.c
+++ b/nuttx/configs/sam3u-ek/src/up_leds.c
@@ -162,10 +162,10 @@ static void up_setleds(uint8_t state)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
(void)sam_configgpio(GPIO_LED0);
(void)sam_configgpio(GPIO_LED1);
@@ -173,19 +173,19 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
up_setleds(g_ledon[led & 7]);
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
up_setleds(g_ledoff[led & 7]);
}
diff --git a/nuttx/configs/sam4l-xplained/src/sam4l-xplained.h b/nuttx/configs/sam4l-xplained/src/sam4l-xplained.h
index bbb88b811..69ed68e2f 100644
--- a/nuttx/configs/sam4l-xplained/src/sam4l-xplained.h
+++ b/nuttx/configs/sam4l-xplained/src/sam4l-xplained.h
@@ -359,11 +359,11 @@ int sam_slcd_initialize(void);
#endif
/************************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
************************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void);
+void board_led_initialize(void);
#endif
#endif /* __ASSEMBLY__ */
diff --git a/nuttx/configs/sam4l-xplained/src/sam_autoleds.c b/nuttx/configs/sam4l-xplained/src/sam_autoleds.c
index 06d647b63..5a382ea17 100644
--- a/nuttx/configs/sam4l-xplained/src/sam_autoleds.c
+++ b/nuttx/configs/sam4l-xplained/src/sam_autoleds.c
@@ -105,19 +105,19 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
(void)sam_configgpio(GPIO_LED0);
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
bool ledstate = true;
@@ -144,10 +144,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
switch (led)
{
diff --git a/nuttx/configs/sam4l-xplained/src/sam_boot.c b/nuttx/configs/sam4l-xplained/src/sam_boot.c
index ac831ab7b..e6975562d 100644
--- a/nuttx/configs/sam4l-xplained/src/sam_boot.c
+++ b/nuttx/configs/sam4l-xplained/src/sam_boot.c
@@ -81,6 +81,6 @@ void sam_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/sam4s-xplained/src/sam4s-xplained.h b/nuttx/configs/sam4s-xplained/src/sam4s-xplained.h
index 941c99df2..422cc5a11 100644
--- a/nuttx/configs/sam4s-xplained/src/sam4s-xplained.h
+++ b/nuttx/configs/sam4s-xplained/src/sam4s-xplained.h
@@ -136,11 +136,11 @@ void sam_sram_initialize(void);
#endif
/************************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
************************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void);
+void board_led_initialize(void);
#endif
#endif /* __ASSEMBLY__ */
diff --git a/nuttx/configs/sam4s-xplained/src/sam_autoleds.c b/nuttx/configs/sam4s-xplained/src/sam_autoleds.c
index 9b912e4ff..4cf01a1a1 100644
--- a/nuttx/configs/sam4s-xplained/src/sam_autoleds.c
+++ b/nuttx/configs/sam4s-xplained/src/sam_autoleds.c
@@ -97,10 +97,10 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED1-2 GPIOs for output */
@@ -109,10 +109,10 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
bool led1on = false;
bool led2on = false;
@@ -140,10 +140,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
if (led != 2)
{
diff --git a/nuttx/configs/sam4s-xplained/src/sam_boot.c b/nuttx/configs/sam4s-xplained/src/sam_boot.c
index bf32af5c1..95f3ba8e2 100644
--- a/nuttx/configs/sam4s-xplained/src/sam_boot.c
+++ b/nuttx/configs/sam4s-xplained/src/sam_boot.c
@@ -76,6 +76,6 @@ void sam_boardinitialize(void)
#ifdef CONFIG_ARCH_LEDS
/* Configure on-board LEDs if LED support has been selected. */
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/sama5d3x-ek/src/sam_autoleds.c b/nuttx/configs/sama5d3x-ek/src/sam_autoleds.c
index afef4f3b2..f0a5da5b7 100644
--- a/nuttx/configs/sama5d3x-ek/src/sam_autoleds.c
+++ b/nuttx/configs/sama5d3x-ek/src/sam_autoleds.c
@@ -115,10 +115,10 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED PIOs for output */
@@ -127,10 +127,10 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
bool blueoff = true; /* Low illuminates */
bool redon = false; /* High illuminates */
@@ -158,10 +158,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
if (led != 2)
{
diff --git a/nuttx/configs/sama5d3x-ek/src/sam_boot.c b/nuttx/configs/sama5d3x-ek/src/sam_boot.c
index a1efeeb98..660529f08 100644
--- a/nuttx/configs/sama5d3x-ek/src/sam_boot.c
+++ b/nuttx/configs/sama5d3x-ek/src/sam_boot.c
@@ -118,7 +118,7 @@ void sam_boardinitialize(void)
#ifdef CONFIG_ARCH_LEDS
/* Configure on-board LEDs if LED support has been selected. */
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/sama5d3x-ek/src/sama5d3x-ek.h b/nuttx/configs/sama5d3x-ek/src/sama5d3x-ek.h
index 3273c3b25..e19773c75 100644
--- a/nuttx/configs/sama5d3x-ek/src/sama5d3x-ek.h
+++ b/nuttx/configs/sama5d3x-ek/src/sama5d3x-ek.h
@@ -737,11 +737,11 @@ void weak_function sam_netinitialize(void);
#endif
/************************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
************************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void);
+void board_led_initialize(void);
#endif
/************************************************************************************
diff --git a/nuttx/configs/shenzhou/src/up_autoleds.c b/nuttx/configs/shenzhou/src/up_autoleds.c
index 522859f3e..6e9ffe61d 100644
--- a/nuttx/configs/shenzhou/src/up_autoleds.c
+++ b/nuttx/configs/shenzhou/src/up_autoleds.c
@@ -351,11 +351,11 @@ static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@@ -366,19 +366,19 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
led_setonoff(ON_BITS(g_ledbits[led]));
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
led_setonoff(OFF_BITS(g_ledbits[led]));
}
@@ -395,7 +395,7 @@ void up_ledpminitialize(void)
int ret = pm_register(&g_ledscb);
if (ret != OK)
{
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
}
}
#endif /* CONFIG_PM */
diff --git a/nuttx/configs/shenzhou/src/up_boot.c b/nuttx/configs/shenzhou/src/up_boot.c
index efc4f26bd..ace4978fe 100644
--- a/nuttx/configs/shenzhou/src/up_boot.c
+++ b/nuttx/configs/shenzhou/src/up_boot.c
@@ -97,6 +97,6 @@ void stm32_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/skp16c26/src/up_leds.c b/nuttx/configs/skp16c26/src/up_leds.c
index 024d8f143..66e4bc009 100644
--- a/nuttx/configs/skp16c26/src/up_leds.c
+++ b/nuttx/configs/skp16c26/src/up_leds.c
@@ -105,7 +105,7 @@ static uint8_t g_nestlevel;
************************************************************************************/
/************************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
************************************************************************************/
static void up_setleds(uint8_t gybits, uint8_t rbit)
@@ -128,10 +128,10 @@ static void up_setleds(uint8_t gybits, uint8_t rbit)
************************************************************************************/
/************************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
************************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
register uint8_t regval;
@@ -157,10 +157,10 @@ void up_ledinit(void)
}
/************************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
************************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
uint8_t ledset;
@@ -193,10 +193,10 @@ void up_ledon(int led)
}
/************************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
************************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
uint8_t ledset;
diff --git a/nuttx/configs/spark/include/board.h b/nuttx/configs/spark/include/board.h
index 153c2a67a..c9974bf98 100644
--- a/nuttx/configs/spark/include/board.h
+++ b/nuttx/configs/spark/include/board.h
@@ -223,7 +223,7 @@ extern "C"
************************************************************************************/
/************************************************************************************
- * Name: up_ledinit, up_setled, and up_setleds
+ * Name: board_led_initialize, up_setled, and up_setleds
*
* Description:
* If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board LEDs. If
@@ -233,8 +233,8 @@ extern "C"
************************************************************************************/
#ifndef CONFIG_ARCH_LEDS
-#undef up_ledinit // Remove macro definition to reuse name
-void up_ledinit(void);
+#undef board_led_initialize // Remove macro definition to reuse name
+void board_led_initialize(void);
void up_setled(int led, bool ledon);
void up_setleds(uint8_t ledset, uint8_t led_states_set);
#endif
diff --git a/nuttx/configs/spark/src/up_autoleds.c b/nuttx/configs/spark/src/up_autoleds.c
index 7f054cf1d..dc34fa03b 100644
--- a/nuttx/configs/spark/src/up_autoleds.c
+++ b/nuttx/configs/spark/src/up_autoleds.c
@@ -264,10 +264,10 @@ static void led_setonoff(unsigned int bits)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@@ -278,19 +278,19 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
led_setonoff(ON_BITS(g_ledbits[led]));
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
led_setonoff(OFF_BITS(g_ledbits[led]));
}
diff --git a/nuttx/configs/spark/src/up_boot.c b/nuttx/configs/spark/src/up_boot.c
index 774b3c03e..1aae93509 100644
--- a/nuttx/configs/spark/src/up_boot.c
+++ b/nuttx/configs/spark/src/up_boot.c
@@ -74,7 +74,7 @@ void stm32_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
#ifdef CONFIG_ARCH_HAVE_BUTTONS
diff --git a/nuttx/configs/spark/src/up_userleds.c b/nuttx/configs/spark/src/up_userleds.c
index 44326af68..6cb47d017 100644
--- a/nuttx/configs/spark/src/up_userleds.c
+++ b/nuttx/configs/spark/src/up_userleds.c
@@ -89,10 +89,10 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
diff --git a/nuttx/configs/stm3210e-eval/src/up_boot.c b/nuttx/configs/stm3210e-eval/src/up_boot.c
index 576094c5e..16e8f22e2 100644
--- a/nuttx/configs/stm3210e-eval/src/up_boot.c
+++ b/nuttx/configs/stm3210e-eval/src/up_boot.c
@@ -103,6 +103,6 @@ void stm32_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/stm3210e-eval/src/up_idle.c b/nuttx/configs/stm3210e-eval/src/up_idle.c
index 7b682e2bb..e3fb2c6c0 100644
--- a/nuttx/configs/stm3210e-eval/src/up_idle.c
+++ b/nuttx/configs/stm3210e-eval/src/up_idle.c
@@ -68,8 +68,8 @@
*/
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
-# define BEGIN_IDLE() up_ledon(LED_IDLE)
-# define END_IDLE() up_ledoff(LED_IDLE)
+# define BEGIN_IDLE() board_led_on(LED_IDLE)
+# define END_IDLE() board_led_off(LED_IDLE)
#else
# define BEGIN_IDLE()
# define END_IDLE()
diff --git a/nuttx/configs/stm3210e-eval/src/up_leds.c b/nuttx/configs/stm3210e-eval/src/up_leds.c
index 1266b7203..06c8ce889 100644
--- a/nuttx/configs/stm3210e-eval/src/up_leds.c
+++ b/nuttx/configs/stm3210e-eval/src/up_leds.c
@@ -347,11 +347,11 @@ static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@@ -362,19 +362,19 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
led_setonoff(ON_BITS(g_ledbits[led]));
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
led_setonoff(OFF_BITS(g_ledbits[led]));
}
@@ -391,7 +391,7 @@ void up_ledpminitialize(void)
int ret = pm_register(&g_ledscb);
if (ret != OK)
{
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
}
}
#endif /* CONFIG_PM */
diff --git a/nuttx/configs/stm3220g-eval/src/up_autoleds.c b/nuttx/configs/stm3220g-eval/src/up_autoleds.c
index 85010c504..4a97b284b 100644
--- a/nuttx/configs/stm3220g-eval/src/up_autoleds.c
+++ b/nuttx/configs/stm3220g-eval/src/up_autoleds.c
@@ -224,10 +224,10 @@ static void led_setonoff(unsigned int bits)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@@ -238,19 +238,19 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
led_setonoff(ON_BITS(g_ledbits[led]));
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
led_setonoff(OFF_BITS(g_ledbits[led]));
}
diff --git a/nuttx/configs/stm3220g-eval/src/up_boot.c b/nuttx/configs/stm3220g-eval/src/up_boot.c
index fa24a86b4..17dc7cd22 100644
--- a/nuttx/configs/stm3220g-eval/src/up_boot.c
+++ b/nuttx/configs/stm3220g-eval/src/up_boot.c
@@ -103,6 +103,6 @@ void stm32_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/stm3240g-eval/src/up_autoleds.c b/nuttx/configs/stm3240g-eval/src/up_autoleds.c
index 8474a0476..5e2cc44de 100644
--- a/nuttx/configs/stm3240g-eval/src/up_autoleds.c
+++ b/nuttx/configs/stm3240g-eval/src/up_autoleds.c
@@ -224,10 +224,10 @@ static void led_setonoff(unsigned int bits)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@@ -238,19 +238,19 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
led_setonoff(ON_BITS(g_ledbits[led]));
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
led_setonoff(OFF_BITS(g_ledbits[led]));
}
diff --git a/nuttx/configs/stm3240g-eval/src/up_boot.c b/nuttx/configs/stm3240g-eval/src/up_boot.c
index 6317b0717..cd184a368 100644
--- a/nuttx/configs/stm3240g-eval/src/up_boot.c
+++ b/nuttx/configs/stm3240g-eval/src/up_boot.c
@@ -239,7 +239,7 @@ void stm32_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/stm32_tiny/src/up_boot.c b/nuttx/configs/stm32_tiny/src/up_boot.c
index 525cae8fa..f9a274b1b 100644
--- a/nuttx/configs/stm32_tiny/src/up_boot.c
+++ b/nuttx/configs/stm32_tiny/src/up_boot.c
@@ -74,7 +74,7 @@ void stm32_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
/* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function
diff --git a/nuttx/configs/stm32_tiny/src/up_leds.c b/nuttx/configs/stm32_tiny/src/up_leds.c
index f5ee45358..e476fabc8 100644
--- a/nuttx/configs/stm32_tiny/src/up_leds.c
+++ b/nuttx/configs/stm32_tiny/src/up_leds.c
@@ -86,23 +86,23 @@ static inline void set_led(bool v)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED GPIO for output */
stm32_configgpio(GPIO_LED);
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
- ledvdbg("up_ledon(%d)\n",led);
+ ledvdbg("board_led_on(%d)\n",led);
switch (led)
{
case LED_STARTED:
@@ -118,10 +118,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
switch (led)
{
diff --git a/nuttx/configs/stm32f100rc_generic/src/up_boot.c b/nuttx/configs/stm32f100rc_generic/src/up_boot.c
index d1922b9bf..ca9f89d68 100644
--- a/nuttx/configs/stm32f100rc_generic/src/up_boot.c
+++ b/nuttx/configs/stm32f100rc_generic/src/up_boot.c
@@ -65,6 +65,6 @@ void stm32_boardinitialize(void)
{
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/stm32f100rc_generic/src/up_leds.c b/nuttx/configs/stm32f100rc_generic/src/up_leds.c
index 83e1761dc..ea453d15a 100644
--- a/nuttx/configs/stm32f100rc_generic/src/up_leds.c
+++ b/nuttx/configs/stm32f100rc_generic/src/up_leds.c
@@ -74,30 +74,30 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
stm32_configgpio(GPIO_LED1); /* Configure LED1 GPIO for output */
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
if (led == 1)
stm32_gpiowrite(GPIO_LED1, true);
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
if (led == 0)
stm32_gpiowrite(GPIO_LED1, false);
diff --git a/nuttx/configs/stm32f3discovery/src/up_autoleds.c b/nuttx/configs/stm32f3discovery/src/up_autoleds.c
index 1191fb689..582b2e55e 100644
--- a/nuttx/configs/stm32f3discovery/src/up_autoleds.c
+++ b/nuttx/configs/stm32f3discovery/src/up_autoleds.c
@@ -85,10 +85,10 @@ static const uint32_t g_ledcfg[BOARD_NLEDS] =
****************************************************************************/
/****************************************************************************
- * Name: up_ledonoff
+ * Name: board_led_onoff
****************************************************************************/
-void up_ledonoff(int led, bool state)
+void board_led_onoff(int led, bool state)
{
if ((unsigned)led < BOARD_NLEDS)
{
@@ -101,10 +101,10 @@ void up_ledonoff(int led, bool state)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
int i;
@@ -117,21 +117,21 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
- up_ledonoff(led, true);
+ board_led_onoff(led, true);
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
- up_ledonoff(led, false);
+ board_led_onoff(led, false);
}
#endif /* CONFIG_ARCH_LEDS */
diff --git a/nuttx/configs/stm32f3discovery/src/up_boot.c b/nuttx/configs/stm32f3discovery/src/up_boot.c
index 8055c3810..5d2c99697 100644
--- a/nuttx/configs/stm32f3discovery/src/up_boot.c
+++ b/nuttx/configs/stm32f3discovery/src/up_boot.c
@@ -97,6 +97,6 @@ void stm32_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/stm32f429i-disco/src/up_autoleds.c b/nuttx/configs/stm32f429i-disco/src/up_autoleds.c
index d7bc03668..e93a94969 100644
--- a/nuttx/configs/stm32f429i-disco/src/up_autoleds.c
+++ b/nuttx/configs/stm32f429i-disco/src/up_autoleds.c
@@ -204,10 +204,10 @@ static void led_setonoff(unsigned int bits)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@@ -216,19 +216,19 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
led_setonoff(ON_BITS(g_ledbits[led]));
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
led_setonoff(OFF_BITS(g_ledbits[led]));
}
diff --git a/nuttx/configs/stm32f429i-disco/src/up_boot.c b/nuttx/configs/stm32f429i-disco/src/up_boot.c
index d6eb2df16..1f1d59fb0 100644
--- a/nuttx/configs/stm32f429i-disco/src/up_boot.c
+++ b/nuttx/configs/stm32f429i-disco/src/up_boot.c
@@ -99,7 +99,7 @@ void stm32_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
#ifdef CONFIG_STM32_FSMC
diff --git a/nuttx/configs/stm32f429i-disco/src/up_idle.c b/nuttx/configs/stm32f429i-disco/src/up_idle.c
index 4ba71ac9a..bd8d00816 100644
--- a/nuttx/configs/stm32f429i-disco/src/up_idle.c
+++ b/nuttx/configs/stm32f429i-disco/src/up_idle.c
@@ -67,8 +67,8 @@
*/
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
-# define BEGIN_IDLE() up_ledon(LED_IDLE)
-# define END_IDLE() up_ledoff(LED_IDLE)
+# define BEGIN_IDLE() board_led_on(LED_IDLE)
+# define END_IDLE() board_led_off(LED_IDLE)
#else
# define BEGIN_IDLE()
# define END_IDLE()
diff --git a/nuttx/configs/stm32f429i-disco/src/up_userleds.c b/nuttx/configs/stm32f429i-disco/src/up_userleds.c
index a4224f975..c8b5038c4 100644
--- a/nuttx/configs/stm32f429i-disco/src/up_userleds.c
+++ b/nuttx/configs/stm32f429i-disco/src/up_userleds.c
@@ -234,7 +234,7 @@ void up_ledpminitialize(void)
int ret = pm_register(&g_ledscb);
if (ret != OK)
{
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
}
}
#endif /* CONFIG_PM */
diff --git a/nuttx/configs/stm32f4discovery/src/up_autoleds.c b/nuttx/configs/stm32f4discovery/src/up_autoleds.c
index 985c1000f..04a87c67c 100644
--- a/nuttx/configs/stm32f4discovery/src/up_autoleds.c
+++ b/nuttx/configs/stm32f4discovery/src/up_autoleds.c
@@ -224,10 +224,10 @@ static void led_setonoff(unsigned int bits)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@@ -238,19 +238,19 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
led_setonoff(ON_BITS(g_ledbits[led]));
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
led_setonoff(OFF_BITS(g_ledbits[led]));
}
diff --git a/nuttx/configs/stm32f4discovery/src/up_boot.c b/nuttx/configs/stm32f4discovery/src/up_boot.c
index ad92809f2..5737ebc20 100644
--- a/nuttx/configs/stm32f4discovery/src/up_boot.c
+++ b/nuttx/configs/stm32f4discovery/src/up_boot.c
@@ -98,7 +98,7 @@ void stm32_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/stm32f4discovery/src/up_idle.c b/nuttx/configs/stm32f4discovery/src/up_idle.c
index c8563acb9..30f3a77f1 100644
--- a/nuttx/configs/stm32f4discovery/src/up_idle.c
+++ b/nuttx/configs/stm32f4discovery/src/up_idle.c
@@ -67,8 +67,8 @@
*/
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
-# define BEGIN_IDLE() up_ledon(LED_IDLE)
-# define END_IDLE() up_ledoff(LED_IDLE)
+# define BEGIN_IDLE() board_led_on(LED_IDLE)
+# define END_IDLE() board_led_off(LED_IDLE)
#else
# define BEGIN_IDLE()
# define END_IDLE()
diff --git a/nuttx/configs/stm32f4discovery/src/up_userleds.c b/nuttx/configs/stm32f4discovery/src/up_userleds.c
index 919919c3e..51ba5ad55 100644
--- a/nuttx/configs/stm32f4discovery/src/up_userleds.c
+++ b/nuttx/configs/stm32f4discovery/src/up_userleds.c
@@ -238,7 +238,7 @@ void up_ledpminitialize(void)
int ret = pm_register(&g_ledscb);
if (ret != OK)
{
- up_ledon(LED_ASSERTION);
+ board_led_on(LED_ASSERTION);
}
}
#endif /* CONFIG_PM */
diff --git a/nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c b/nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c
index 6fcdbcc21..fa5b09402 100644
--- a/nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c
+++ b/nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c
@@ -97,10 +97,10 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED1-2 GPIOs for output */
@@ -109,10 +109,10 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
bool led1on = false;
bool led2on = false;
@@ -140,10 +140,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
if (led != 2)
{
diff --git a/nuttx/configs/stm32ldiscovery/src/stm32_boot.c b/nuttx/configs/stm32ldiscovery/src/stm32_boot.c
index db515e458..d006342a4 100644
--- a/nuttx/configs/stm32ldiscovery/src/stm32_boot.c
+++ b/nuttx/configs/stm32ldiscovery/src/stm32_boot.c
@@ -85,6 +85,6 @@ void stm32_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/stm32vldiscovery/src/stm32_leds.c b/nuttx/configs/stm32vldiscovery/src/stm32_leds.c
index 5bfd6a60a..a45a1ef0b 100644
--- a/nuttx/configs/stm32vldiscovery/src/stm32_leds.c
+++ b/nuttx/configs/stm32vldiscovery/src/stm32_leds.c
@@ -84,10 +84,10 @@ void stm32_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
if (led == 1)
{
@@ -96,10 +96,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
if (led == 0)
{
diff --git a/nuttx/configs/sure-pic32mx/src/pic32mx_autoleds.c b/nuttx/configs/sure-pic32mx/src/pic32mx_autoleds.c
index dabbf679f..431190baf 100644
--- a/nuttx/configs/sure-pic32mx/src/pic32mx_autoleds.c
+++ b/nuttx/configs/sure-pic32mx/src/pic32mx_autoleds.c
@@ -187,10 +187,10 @@ void pic32mx_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
if (led < LED_NVALUES)
{
@@ -199,10 +199,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
if (led < LED_NVALUES)
{
diff --git a/nuttx/configs/teensy/src/up_leds.c b/nuttx/configs/teensy/src/up_leds.c
index 545148709..50e84471a 100644
--- a/nuttx/configs/teensy/src/up_leds.c
+++ b/nuttx/configs/teensy/src/up_leds.c
@@ -104,10 +104,10 @@ void at90usb_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
/* ON OFF
* LED_STARTED 0 OFF ON (never happens)
@@ -146,10 +146,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
/* ON OFF
* LED_STARTED 0 OFF ON (never happens)
diff --git a/nuttx/configs/twr-k60n512/src/twrk60-internal.h b/nuttx/configs/twr-k60n512/src/twrk60-internal.h
index 9a8b16c9c..e9d8b798a 100644
--- a/nuttx/configs/twr-k60n512/src/twrk60-internal.h
+++ b/nuttx/configs/twr-k60n512/src/twrk60-internal.h
@@ -273,7 +273,7 @@
************************************************************************************/
/************************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
*
* Description:
* Initialize LED GPIOs so that LEDs can be controlled.
@@ -281,7 +281,7 @@
************************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-extern void up_ledinit(void);
+extern void board_led_initialize(void);
#endif
/************************************************************************************
diff --git a/nuttx/configs/twr-k60n512/src/up_boot.c b/nuttx/configs/twr-k60n512/src/up_boot.c
index d811658c3..ee6d4fa0d 100644
--- a/nuttx/configs/twr-k60n512/src/up_boot.c
+++ b/nuttx/configs/twr-k60n512/src/up_boot.c
@@ -97,6 +97,6 @@ void kinetis_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/twr-k60n512/src/up_leds.c b/nuttx/configs/twr-k60n512/src/up_leds.c
index 4c3c35006..ba6a18302 100644
--- a/nuttx/configs/twr-k60n512/src/up_leds.c
+++ b/nuttx/configs/twr-k60n512/src/up_leds.c
@@ -222,7 +222,7 @@ static void led_setonoff(unsigned int bits)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
*
* Description:
* Initialize LED GPIOs so that LEDs can be controlled.
@@ -230,7 +230,7 @@ static void led_setonoff(unsigned int bits)
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@@ -241,19 +241,19 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
led_setonoff(ON_BITS(g_ledbits[led]));
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
led_setonoff(OFF_BITS(g_ledbits[led]));
}
diff --git a/nuttx/configs/ubw32/src/up_leds.c b/nuttx/configs/ubw32/src/up_leds.c
index 0fb6fa14a..a2d9cbd58 100644
--- a/nuttx/configs/ubw32/src/up_leds.c
+++ b/nuttx/configs/ubw32/src/up_leds.c
@@ -238,11 +238,11 @@ void pic32mx_setleds(uint8_t ledset)
#endif
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledon(int led)
+void board_led_on(int led)
{
if ((unsigned)led < LED_NVALUES)
{
@@ -252,11 +252,11 @@ void up_ledon(int led)
#endif
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledoff(int led)
+void board_led_off(int led)
{
if ((unsigned)led < LED_NVALUES)
{
diff --git a/nuttx/configs/us7032evb1/src/up_leds.c b/nuttx/configs/us7032evb1/src/up_leds.c
index d532bc355..6d48909a6 100644
--- a/nuttx/configs/us7032evb1/src/up_leds.c
+++ b/nuttx/configs/us7032evb1/src/up_leds.c
@@ -70,11 +70,11 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
uint16_t reg16;
@@ -98,10 +98,10 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
uint16_t reg16;
@@ -116,10 +116,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
uint16_t reg16;
diff --git a/nuttx/configs/viewtool-stm32f107/src/stm32_leds.c b/nuttx/configs/viewtool-stm32f107/src/stm32_leds.c
index 8bc42d707..3b468a9aa 100644
--- a/nuttx/configs/viewtool-stm32f107/src/stm32_leds.c
+++ b/nuttx/configs/viewtool-stm32f107/src/stm32_leds.c
@@ -157,7 +157,7 @@ void stm32_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
*
* Description:
* Select the "logical" ON state:
@@ -178,7 +178,7 @@ void stm32_ledinit(void)
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledon(int led)
+void board_led_on(int led)
{
switch (led)
{
@@ -210,7 +210,7 @@ void up_ledon(int led)
#endif
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
*
* Description:
* Select the "logical" OFF state:
@@ -231,7 +231,7 @@ void up_ledon(int led)
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledoff(int led)
+void board_led_off(int led)
{
switch (led)
{
diff --git a/nuttx/configs/viewtool-stm32f107/src/viewtool_stm32f107.h b/nuttx/configs/viewtool-stm32f107/src/viewtool_stm32f107.h
index 8bfc7b57f..0bb250943 100644
--- a/nuttx/configs/viewtool-stm32f107/src/viewtool_stm32f107.h
+++ b/nuttx/configs/viewtool-stm32f107/src/viewtool_stm32f107.h
@@ -317,7 +317,7 @@ void weak_function stm32_usbdev_initialize(void);
int stm32_sdinitialize(int minor);
/************************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
*
* Description:
* Configure LEDs. LEDs are left in the OFF state.
diff --git a/nuttx/configs/vsn/include/power.h b/nuttx/configs/vsn/include/power.h
index 5be7ab795..23ec8e20c 100644
--- a/nuttx/configs/vsn/include/power.h
+++ b/nuttx/configs/vsn/include/power.h
@@ -1,72 +1,72 @@
-/************************************************************************************
- * configs/vsn/include/power.h
- * include/arch/board/power.h
- *
- * Copyright (C) 2011 Uros Platise. All rights reserved
- *
- * Authors: Uros Platise <uros.platise@isotel.eu>
- *
- * 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_BOARD_POWER_H
-#define __ARCH_BOARD_POWER_H
-
-#ifndef __ASSEMBLY__
-#undef EXTERN
-#if defined(__cplusplus)
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
-#endif
-
-/************************************************************************************
- * Public Functions
- ************************************************************************************/
-
-/** Perform system reset on board level
- */
-void board_power_reboot(void);
-
-/** Power off the board
- *
- * If it returns, then it was not possible to power-off the board due to some
- * other constraints. In the case of VSN due to external power supply, press
- * of a push-button or RTC alarm.
- */
-void board_power_off(void);
-
-#undef EXTERN
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* __ASSEMBLY__ */
-#endif /* __ARCH_BOARD_POWER_H */
+/************************************************************************************
+ * configs/vsn/include/power.h
+ * include/arch/board/power.h
+ *
+ * Copyright (C) 2011 Uros Platise. All rights reserved
+ *
+ * Authors: Uros Platise <uros.platise@isotel.eu>
+ *
+ * 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_BOARD_POWER_H
+#define __ARCH_BOARD_POWER_H
+
+#ifndef __ASSEMBLY__
+#undef EXTERN
+#if defined(__cplusplus)
+#define EXTERN extern "C"
+extern "C" {
+#else
+#define EXTERN extern
+#endif
+
+/************************************************************************************
+ * Public Functions
+ ************************************************************************************/
+
+/** Perform system reset on board level
+ */
+void board_power_reboot(void);
+
+/** Power off the board
+ *
+ * If it returns, then it was not possible to power-off the board due to some
+ * other constraints. In the case of VSN due to external power supply, press
+ * of a push-button or RTC alarm.
+ */
+void board_power_off(void);
+
+#undef EXTERN
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* __ASSEMBLY__ */
+#endif /* __ARCH_BOARD_POWER_H */
diff --git a/nuttx/configs/vsn/src/boot.c b/nuttx/configs/vsn/src/boot.c
index 94dcd0043..e9ce24fbe 100644
--- a/nuttx/configs/vsn/src/boot.c
+++ b/nuttx/configs/vsn/src/boot.c
@@ -85,6 +85,6 @@ void stm32_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/vsn/src/leds.c b/nuttx/configs/vsn/src/leds.c
index 5a674465d..141b39593 100644
--- a/nuttx/configs/vsn/src/leds.c
+++ b/nuttx/configs/vsn/src/leds.c
@@ -89,13 +89,13 @@ static void led_setonoff(unsigned int bits)
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
stm32_configgpio(GPIO_LED);
}
-void up_ledon(int led)
+void board_led_on(int led)
{
if (led==LED_IDLE) {
irqidle_mask = irqsave();
@@ -104,7 +104,7 @@ void up_ledon(int led)
}
-void up_ledoff(int led)
+void board_led_off(int led)
{
if (led==LED_IDLE) {
stm32_gpiowrite(GPIO_LED, false);
diff --git a/nuttx/configs/z16f2800100zcog/src/z16f_leds.c b/nuttx/configs/z16f2800100zcog/src/z16f_leds.c
index dfcf96fec..e08d33ad7 100644
--- a/nuttx/configs/z16f2800100zcog/src/z16f_leds.c
+++ b/nuttx/configs/z16f2800100zcog/src/z16f_leds.c
@@ -67,11 +67,11 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* The following is performed up_lowinit() as well */
@@ -80,10 +80,10 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
if ((unsigned)led <= 7)
{
@@ -92,14 +92,14 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
if (led >= 1)
{
- up_ledon(led-1);
+ board_led_on(led-1);
}
}
#endif /* CONFIG_ARCH_LEDS */
diff --git a/nuttx/configs/z8encore000zco/src/z8_leds.c b/nuttx/configs/z8encore000zco/src/z8_leds.c
index 097b27efa..c6f7f1819 100644
--- a/nuttx/configs/z8encore000zco/src/z8_leds.c
+++ b/nuttx/configs/z8encore000zco/src/z8_leds.c
@@ -195,11 +195,11 @@ static void z8_putarray(FAR const struct z8_ledarray_s *array)
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
putreg8(0x00, PEAF); /* PE Alt func = Port */
putreg8(0x00, PGAF); /* PG Alt func = Port */
@@ -218,10 +218,10 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
if ((unsigned)led <= 8)
{
@@ -230,14 +230,14 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
if (led >= 1)
{
- up_ledon(led-1);
+ board_led_on(led-1);
}
}
#endif /* CONFIG_ARCH_LEDS */
diff --git a/nuttx/configs/z8f64200100kit/src/z8_leds.c b/nuttx/configs/z8f64200100kit/src/z8_leds.c
index c5b6ec8af..1e54b1b21 100644
--- a/nuttx/configs/z8f64200100kit/src/z8_leds.c
+++ b/nuttx/configs/z8f64200100kit/src/z8_leds.c
@@ -63,27 +63,27 @@
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
-void up_ledinit(void)
+void board_led_initialize(void)
{
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
}
#endif /* CONFIG_ARCH_LEDS */
diff --git a/nuttx/configs/zkit-arm-1769/src/up_boot.c b/nuttx/configs/zkit-arm-1769/src/up_boot.c
index 96f8af645..7e47ac398 100644
--- a/nuttx/configs/zkit-arm-1769/src/up_boot.c
+++ b/nuttx/configs/zkit-arm-1769/src/up_boot.c
@@ -92,6 +92,6 @@ void lpc17_boardinitialize(void)
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
- up_ledinit();
+ board_led_initialize();
#endif
}
diff --git a/nuttx/configs/zkit-arm-1769/src/up_leds.c b/nuttx/configs/zkit-arm-1769/src/up_leds.c
index 2b331b5bb..41bf0caca 100644
--- a/nuttx/configs/zkit-arm-1769/src/up_leds.c
+++ b/nuttx/configs/zkit-arm-1769/src/up_leds.c
@@ -116,10 +116,10 @@ static int g_nestcount;
****************************************************************************/
/****************************************************************************
- * Name: up_ledinit
+ * Name: board_led_initialize
****************************************************************************/
-void up_ledinit(void)
+void board_led_initialize(void)
{
/* Configure all LED GPIO lines */
@@ -128,10 +128,10 @@ void up_ledinit(void)
}
/****************************************************************************
- * Name: up_ledon
+ * Name: board_led_on
****************************************************************************/
-void up_ledon(int led)
+void board_led_on(int led)
{
/* We will control LED1 and LED2 not yet completed the boot sequence. */
@@ -178,10 +178,10 @@ void up_ledon(int led)
}
/****************************************************************************
- * Name: up_ledoff
+ * Name: board_led_off
****************************************************************************/
-void up_ledoff(int led)
+void board_led_off(int led)
{
/* In all states, OFF can only mean turning off the HB LED */