mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Updates for PIC32MX USB driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4233 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -2300,3 +2300,6 @@
|
|||||||
|
|
||||||
6.14 2012-xx-xx Gregory Nutt <gnutt@nuttx.org>
|
6.14 2012-xx-xx Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
|
||||||
|
* tools/Makefile.txport, mkexport.sh, and configure.sh. Changes submitted
|
||||||
|
by Mike Smith to support configuration and 'make export' on MAC OS.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
NuttX TODO List (Last updated December 20, 2011)
|
NuttX TODO List (Last updated December 27, 2011)
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
This file summarizes known NuttX bugs, limitations, inconsistencies with
|
This file summarizes known NuttX bugs, limitations, inconsistencies with
|
||||||
@@ -31,7 +31,7 @@ nuttx/
|
|||||||
(2) ARM/LPC313x (arch/arm/src/lpc313x/)
|
(2) ARM/LPC313x (arch/arm/src/lpc313x/)
|
||||||
(3) ARM/STR71x (arch/arm/src/str71x/)
|
(3) ARM/STR71x (arch/arm/src/str71x/)
|
||||||
(3) ARM/LM3S6918 (arch/arm/src/lm3s/)
|
(3) ARM/LM3S6918 (arch/arm/src/lm3s/)
|
||||||
(4) ARM/STM32 (arch/arm/src/stm32/)
|
(5) ARM/STM32 (arch/arm/src/stm32/)
|
||||||
(3) AVR (arch/avr)
|
(3) AVR (arch/avr)
|
||||||
(0) Intel x86 (arch/x86)
|
(0) Intel x86 (arch/x86)
|
||||||
(4) 8051 / MCS51 (arch/8051/)
|
(4) 8051 / MCS51 (arch/8051/)
|
||||||
@@ -1072,6 +1072,12 @@ o ARM/STM32 (arch/arm/src/stm32/)
|
|||||||
Priority: Low until someone needs DMA1, Channel 5 (ADC3, UART4_TX, TIM5_CH1, or
|
Priority: Low until someone needs DMA1, Channel 5 (ADC3, UART4_TX, TIM5_CH1, or
|
||||||
TIM8_CH2).
|
TIM8_CH2).
|
||||||
|
|
||||||
|
Title: UNFINISHED DRIVERS
|
||||||
|
Description: The following drivers are incomplete: DAC. The following drivers
|
||||||
|
are untested: DMA on the F4, CAN.
|
||||||
|
Status: Open
|
||||||
|
Priority: Medium
|
||||||
|
|
||||||
o AVR (arch/avr)
|
o AVR (arch/avr)
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
/* GPIO settings used in the configport, readport, writeport, etc.
|
/* GPIO settings used in the configport, readport, writeport, etc.
|
||||||
*
|
*
|
||||||
* General encoding:
|
* General encoding:
|
||||||
* MMxV Ixxx RRRx PPPP
|
* MMxV IIxx RRRx PPPP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GPIO_MODE_SHIFT (14) /* Bits 14-15: I/O mode */
|
#define GPIO_MODE_SHIFT (14) /* Bits 14-15: I/O mode */
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
# define GPIO_VALUE_ONE (1 << 12)
|
# define GPIO_VALUE_ONE (1 << 12)
|
||||||
# define GPIO_VALUE_ZERO (0)
|
# define GPIO_VALUE_ZERO (0)
|
||||||
|
|
||||||
#define GPIO_INT_SHIFT (14) /* Bits 10-11: Interrupt mode */
|
#define GPIO_INT_SHIFT (10) /* Bits 10-11: Interrupt mode */
|
||||||
#define GPIO_INT_MASK (3 << GPIO_INT_SHIFT)
|
#define GPIO_INT_MASK (3 << GPIO_INT_SHIFT)
|
||||||
# define GPIO_INT_NONE (0 << GPIO_INT_SHIFT) /* Bit 00: No interrupt */
|
# define GPIO_INT_NONE (0 << GPIO_INT_SHIFT) /* Bit 00: No interrupt */
|
||||||
# define GPIO_INT (1 << GPIO_INT_SHIFT) /* Bit 01: Change notification enable */
|
# define GPIO_INT (1 << GPIO_INT_SHIFT) /* Bit 01: Change notification enable */
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -48,6 +48,10 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y)
|
|||||||
CSRCS += up_buttons.c
|
CSRCS += up_buttons.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_PIC32MX_USBDEV),y)
|
||||||
|
CSRCS += up_usbdev.c
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_NSH_ARCHINIT),y)
|
ifeq ($(CONFIG_NSH_ARCHINIT),y)
|
||||||
CSRCS += up_nsh.c
|
CSRCS += up_nsh.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* configs/sure-pic32mx/src/sure-internal.h
|
* configs/sure-pic32mx/src/sure-internal.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -81,7 +81,7 @@ extern "C" {
|
|||||||
* Name: pic32mx_spiinitialize
|
* Name: pic32mx_spiinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the PCB Logic board.
|
* Called to configure SPI chip select GPIO pins for the Sure PIC32MX Logic board.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
@@ -89,6 +89,18 @@ extern "C" {
|
|||||||
EXTERN void weak_function pic32mx_spiinitialize(void);
|
EXTERN void weak_function pic32mx_spiinitialize(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/************************************************************************************
|
||||||
|
* Name: pic32mx_usdbinitialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Called to configure the mini-B PHY on the Sure PIC32MX board for the USB device
|
||||||
|
*
|
||||||
|
************************************************************************************/
|
||||||
|
|
||||||
|
#if defined(CONFIG_PIC32MX_USBDEV)
|
||||||
|
EXTERN void weak_function pic32mx_usdbinitialize(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: pic32mx_ledinit
|
* Name: pic32mx_ledinit
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -85,6 +85,15 @@ void pic32mx_boardinitialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Configure the mini-B PHY on the Sure PIC32MX board for the USB device */
|
||||||
|
|
||||||
|
#if defined(CONFIG_PIC32MX_USBDEV)
|
||||||
|
if (pic32mx_usbdevinitialize)
|
||||||
|
{
|
||||||
|
pic32mx_usbdevinitialize();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Configure on-board LEDs if LED support has been selected. */
|
/* Configure on-board LEDs if LED support has been selected. */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* configs/sure-pic32mx/src/up_ssp.c
|
* configs/sure-pic32mx/src/up_spi.c
|
||||||
* arch/arm/src/board/up_ssp.c
|
* arch/arm/src/board/up_spi.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -65,16 +65,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_SPI_DEBUG
|
#ifdef CONFIG_SPI_DEBUG
|
||||||
# define sspdbg lldbg
|
# define spidbg lldbg
|
||||||
# ifdef CONFIG_SPI_VERBOSE
|
# ifdef CONFIG_SPI_VERBOSE
|
||||||
# define sspvdbg lldbg
|
# define spivdbg lldbg
|
||||||
# else
|
# else
|
||||||
# define sspvdbg(x...)
|
# define spivdbg(x...)
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# undef CONFIG_SPI_VERBOSE
|
# undef CONFIG_SPI_VERBOSE
|
||||||
# define sspdbg(x...)
|
# define spidbg(x...)
|
||||||
# define sspvdbg(x...)
|
# define spivdbg(x...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
@@ -86,14 +86,14 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: pic32mx_sspinitialize
|
* Name: pic32mx_spiinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the Sure PIC32MX board.
|
* Called to configure SPI chip select GPIO pins for the Sure PIC32MX board.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void weak_function pic32mx_sspinitialize(void)
|
void weak_function pic32mx_spiinitialize(void)
|
||||||
{
|
{
|
||||||
/* Configure the SPI2 chip select GPIOs */
|
/* Configure the SPI2 chip select GPIOs */
|
||||||
|
|
||||||
@@ -130,13 +130,13 @@ void weak_function pic32mx_sspinitialize(void)
|
|||||||
#ifdef CONFIG_PIC32MX_SPI2
|
#ifdef CONFIG_PIC32MX_SPI2
|
||||||
void pic32mx_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
void pic32mx_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||||
{
|
{
|
||||||
sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||||
#warning "Missing logic"
|
#warning "Missing logic"
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t pic32mx_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
uint8_t pic32mx_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||||
{
|
{
|
||||||
sspdbg("Returning nothing\n");
|
spidbg("Returning nothing\n");
|
||||||
#warning "Missing logic"
|
#warning "Missing logic"
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,4 +165,10 @@ if [ ! -z "${appdir}" ]; then
|
|||||||
echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${TOPDIR}/.configX"
|
echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${TOPDIR}/.configX"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# install the final .configX only if it differs from the existing
|
||||||
|
# .config file.
|
||||||
|
|
||||||
install -C "${TOPDIR}/.configX" "${TOPDIR}/.config"
|
install -C "${TOPDIR}/.configX" "${TOPDIR}/.config"
|
||||||
|
rm -f "${TOPDIR}/.configX"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user