From a4a2a3d6ba4cd5f5c04b8c3acb3267f9403dec54 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Sat, 11 May 2013 08:09:07 -0700 Subject: [PATCH] Added SCU pinmux data for USB LEDs, configured USB LEDs to be outputs (not float). --- firmware/common/hackrf_core.c | 4 ++++ firmware/common/hackrf_core.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/firmware/common/hackrf_core.c b/firmware/common/hackrf_core.c index 0b719ccf..b94fc967 100644 --- a/firmware/common/hackrf_core.c +++ b/firmware/common/hackrf_core.c @@ -379,6 +379,10 @@ void pin_setup(void) { scu_pinmux(SCU_PINMUX_BOOT2, SCU_GPIO_FAST); scu_pinmux(SCU_PINMUX_BOOT3, SCU_GPIO_FAST); + /* Configure USB indicators */ + scu_pinmux(SCU_PINMUX_USB_LED0, SCU_CONF_FUNCTION3); + scu_pinmux(SCU_PINMUX_USB_LED1, SCU_CONF_FUNCTION3); + /* Configure all GPIO as Input (safe state) */ GPIO0_DIR = 0; GPIO1_DIR = 0; diff --git a/firmware/common/hackrf_core.h b/firmware/common/hackrf_core.h index 71f017da..462f8b1d 100644 --- a/firmware/common/hackrf_core.h +++ b/firmware/common/hackrf_core.h @@ -61,6 +61,10 @@ extern "C" #define SCU_PINMUX_BOOT2 (P2_8) /* GPIO5[7] on P2_8 */ #define SCU_PINMUX_BOOT3 (P2_9) /* GPIO1[10] on P2_9 */ +/* USB peripheral */ +#define SCU_PINMUX_USB_LED0 (P6_8) +#define SCU_PINMUX_USB_LED1 (P6_7) + /* SSP1 Peripheral PinMux */ #define SCU_SSP1_MISO (P1_3) /* P1_3 */ #define SCU_SSP1_MOSI (P1_4) /* P1_4 */