PIC32MX: Copy some of the configuration updates from PIC32MZ
This commit is contained in:
parent
30e369dc65
commit
fa3d216185
@ -466,6 +466,10 @@ config PIC32MX_MVEC
|
|||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
|
||||||
|
config PIC32MX_SPI
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
|
||||||
config PIC32MX_T1
|
config PIC32MX_T1
|
||||||
bool
|
bool
|
||||||
default y
|
default y
|
||||||
@ -555,18 +559,22 @@ config PIC32MX_I2C5
|
|||||||
config PIC32MX_SPI1
|
config PIC32MX_SPI1
|
||||||
bool "SPI1"
|
bool "SPI1"
|
||||||
default n
|
default n
|
||||||
|
select PIC32MX_SPI
|
||||||
|
|
||||||
config PIC32MX_SPI2
|
config PIC32MX_SPI2
|
||||||
bool "SPI2"
|
bool "SPI2"
|
||||||
default n
|
default n
|
||||||
|
select PIC32MX_SPI
|
||||||
|
|
||||||
config PIC32MX_SPI3
|
config PIC32MX_SPI3
|
||||||
bool "SPI3"
|
bool "SPI3"
|
||||||
default n
|
default n
|
||||||
|
select PIC32MX_SPI
|
||||||
|
|
||||||
config PIC32MX_SPI4
|
config PIC32MX_SPI4
|
||||||
bool "SPI4"
|
bool "SPI4"
|
||||||
default n
|
default n
|
||||||
|
select PIC32MX_SPI
|
||||||
|
|
||||||
config PIC32MX_UART1
|
config PIC32MX_UART1
|
||||||
bool "UART1"
|
bool "UART1"
|
||||||
@ -1010,6 +1018,29 @@ config PIC32MX_GPIOIRQ
|
|||||||
---help---
|
---help---
|
||||||
Build in support for interrupts based on GPIO inputs from IOPorts
|
Build in support for interrupts based on GPIO inputs from IOPorts
|
||||||
|
|
||||||
|
menu "SPI Driver Configuration"
|
||||||
|
depends on PIC32MX_SPI
|
||||||
|
|
||||||
|
config PIC32MX_SPI_INTERRUPTS
|
||||||
|
bool "SPI Interrupt Driven"
|
||||||
|
default n
|
||||||
|
depends on EXPERIMENTAL
|
||||||
|
|
||||||
|
config PIC32MX_SPI_ENHBUF
|
||||||
|
bool "SPI Enhanced Buffer Mode"
|
||||||
|
default n
|
||||||
|
depends on EXPERIMENTAL
|
||||||
|
|
||||||
|
config PIC32MX_SPI_REGDEBUG
|
||||||
|
bool "SPI Register level debug"
|
||||||
|
depends on DEBUG
|
||||||
|
default n
|
||||||
|
---help---
|
||||||
|
Output detailed register-level SPI device debug information.
|
||||||
|
Requires also DEBUG.
|
||||||
|
|
||||||
|
endmenu # SPI Driver Configuration
|
||||||
|
|
||||||
menu "PIC32MX PHY/Ethernet device driver settings"
|
menu "PIC32MX PHY/Ethernet device driver settings"
|
||||||
depends on PIC32MX_ETHERNET
|
depends on PIC32MX_ETHERNET
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/mips/src/pic32mx/pic32mx-spi.c
|
* arch/mips/src/pic32mx/pic32mx-spi.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* 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
|
||||||
@ -63,18 +63,16 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Enables non-standard debug output from this file.
|
/* Configuration */
|
||||||
*
|
|
||||||
* CONFIG_SPI_DEBUG && CONFIG_DEBUG - Define to enable basic SPI debug
|
|
||||||
* CONFIG_DEBUG_VERBOSE - Define to enable verbose SPI debug
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG
|
#ifndef CONFIG_SPI_EXCHANGE
|
||||||
# undef CONFIG_DEBUG_SPI
|
/* See arch/mips/src/pic32mz/pic32mz-spi.c for an implementation */
|
||||||
# undef CONFIG_DEBUG_VERBOSE
|
|
||||||
# undef CONFIG_SPI_REGDEBUG
|
# error CONFIG_SPI_EXCHANGE not supported by this driver
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Debug */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_SPI
|
#ifdef CONFIG_DEBUG_SPI
|
||||||
# define spidbg lldbg
|
# define spidbg lldbg
|
||||||
# ifdef CONFIG_DEBUG_VERBOSE
|
# ifdef CONFIG_DEBUG_VERBOSE
|
||||||
@ -91,7 +89,7 @@
|
|||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* This structure descibes the state of the SSP driver */
|
/* This structure describes the state of the SSP driver */
|
||||||
|
|
||||||
struct pic32mx_dev_s
|
struct pic32mx_dev_s
|
||||||
{
|
{
|
||||||
@ -310,7 +308,7 @@ static struct pic32mx_dev_s g_spi4dev =
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_SPI_REGDEBUG
|
#ifdef CONFIG_PIC32MX_SPI_REGDEBUG
|
||||||
static uint32_t spi_getreg(FAR struct pic32mx_dev_s *priv, unsigned int offset)
|
static uint32_t spi_getreg(FAR struct pic32mx_dev_s *priv, unsigned int offset)
|
||||||
{
|
{
|
||||||
/* Last address, value, and count */
|
/* Last address, value, and count */
|
||||||
@ -393,7 +391,7 @@ static uint32_t spi_getreg(FAR struct pic32mx_dev_s *priv, unsigned int offset)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_SPI_REGDEBUG
|
#ifdef CONFIG_PIC32MX_SPI_REGDEBUG
|
||||||
static void spi_putreg(FAR struct pic32mx_dev_s *priv, unsigned int offset,
|
static void spi_putreg(FAR struct pic32mx_dev_s *priv, unsigned int offset,
|
||||||
uint32_t value)
|
uint32_t value)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user