mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 06:33:33 +08:00
Updates/fixes related to ENC28J60, Kconfigs, and fire-stm32v2
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5128 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
+20
-62
@@ -27,10 +27,8 @@ config RAMDISK
|
||||
a block driver that can be mounted as a files system. See
|
||||
include/nuttx/ramdisk.h.
|
||||
|
||||
comment "CAN Driver Options"
|
||||
|
||||
config CAN
|
||||
bool "CAN Support"
|
||||
menuconfig CAN
|
||||
bool "CAN Driver Support"
|
||||
default n
|
||||
---help---
|
||||
This selection enables building of the "upper-half" CAN driver.
|
||||
@@ -65,10 +63,8 @@ config CAN_LOOPBACK
|
||||
|
||||
endif
|
||||
|
||||
comment "PWM Driver Options"
|
||||
|
||||
config PWM
|
||||
bool "PWM Support"
|
||||
menuconfig PWM
|
||||
bool "PWM Driver Support"
|
||||
default n
|
||||
---help---
|
||||
This selection enables building of the "upper-half" PWM driver.
|
||||
@@ -86,10 +82,8 @@ config PWM_PULSECOUNT
|
||||
|
||||
endif
|
||||
|
||||
comment "I2C Driver Options"
|
||||
|
||||
config I2C
|
||||
bool "I2C Support"
|
||||
menuconfig I2C
|
||||
bool "I2C Driver Support"
|
||||
default n
|
||||
---help---
|
||||
This selection enables building of the "upper-half" I2C driver.
|
||||
@@ -125,10 +119,8 @@ config I2C_NTRACE
|
||||
default n
|
||||
depends on I2C_TRACE
|
||||
|
||||
comment "SPI Driver Options"
|
||||
|
||||
config SPI
|
||||
bool "SPI Support"
|
||||
menuconfig SPI
|
||||
bool "SPI Driver Support"
|
||||
default n
|
||||
---help---
|
||||
This selection enables building of the "upper-half" SPI driver.
|
||||
@@ -159,10 +151,8 @@ config SPI_CMDDATA
|
||||
|
||||
endif
|
||||
|
||||
comment "RTC Driver Options"
|
||||
|
||||
config RTC
|
||||
bool "RTC Support"
|
||||
menuconfig RTC
|
||||
bool "RTC Driver Support"
|
||||
default n
|
||||
---help---
|
||||
This selection enables configuration of a real time clock (RTCdriver.
|
||||
@@ -214,9 +204,7 @@ config RTC_ALARM
|
||||
Enable if the RTC hardware supports setting of an alarm. A callback
|
||||
function will be executed when the alarm goes off.
|
||||
|
||||
comment "Watchdog Driver Options"
|
||||
|
||||
config WATCHDOG
|
||||
menuconfig WATCHDOG
|
||||
bool "Watchdog Timer Support"
|
||||
default n
|
||||
---help---
|
||||
@@ -226,8 +214,6 @@ config WATCHDOG
|
||||
if WATCHDOG
|
||||
endif
|
||||
|
||||
comment "Analog Driver Options"
|
||||
|
||||
menuconfig ANALOG
|
||||
bool "Analog Device(ADC/DAC) Support"
|
||||
default n
|
||||
@@ -241,9 +227,7 @@ if ANALOG
|
||||
source drivers/analog/Kconfig
|
||||
endif
|
||||
|
||||
comment "Block-to-Character Driver Support"
|
||||
|
||||
config BCH
|
||||
menuconfig BCH
|
||||
bool "Block-to-Character (BCH) Support"
|
||||
default n
|
||||
---help---
|
||||
@@ -256,8 +240,6 @@ if BCH
|
||||
source drivers/bch/Kconfig
|
||||
endif
|
||||
|
||||
comment "Input device Driver Options"
|
||||
|
||||
menuconfig INPUT
|
||||
bool "Input Device Support"
|
||||
default n
|
||||
@@ -270,10 +252,8 @@ if INPUT
|
||||
source drivers/input/Kconfig
|
||||
endif
|
||||
|
||||
comment "LCD Driver Options"
|
||||
|
||||
menuconfig LCD
|
||||
bool "LCD Support"
|
||||
bool "LCD Driver Support"
|
||||
default n
|
||||
select NX_LCDDRIVER
|
||||
---help---
|
||||
@@ -288,10 +268,8 @@ if LCD
|
||||
source drivers/lcd/Kconfig
|
||||
endif
|
||||
|
||||
comment "MMCSD Driver Options"
|
||||
|
||||
menuconfig MMCSD
|
||||
bool "MMC/SD Support"
|
||||
bool "MMC/SD Driver Support"
|
||||
default n
|
||||
---help---
|
||||
Support for MMC/SD block drivers. MMC/SD block drivers based on
|
||||
@@ -302,8 +280,6 @@ if MMCSD
|
||||
source drivers/mmcsd/Kconfig
|
||||
endif
|
||||
|
||||
comment "I2C Driver Options"
|
||||
|
||||
menuconfig MTD
|
||||
bool "Memory Technology Device (MTD) Support"
|
||||
default n
|
||||
@@ -321,8 +297,6 @@ if MTD
|
||||
source drivers/mtd/Kconfig
|
||||
endif
|
||||
|
||||
comment "Network Device Driver Options"
|
||||
|
||||
menuconfig NETDEVICES
|
||||
bool "Network Device Support"
|
||||
default n
|
||||
@@ -333,8 +307,6 @@ if NETDEVICES
|
||||
source drivers/net/Kconfig
|
||||
endif
|
||||
|
||||
comment "Pipe Options"
|
||||
|
||||
menuconfig PIPES
|
||||
bool "FIFO and named pipe drivers"
|
||||
default n
|
||||
@@ -346,8 +318,6 @@ if PIPES
|
||||
source drivers/pipes/Kconfig
|
||||
endif
|
||||
|
||||
comment "Power Management Options"
|
||||
|
||||
config PM
|
||||
bool "Power management (PM) driver interfaces"
|
||||
default n
|
||||
@@ -367,10 +337,8 @@ if POWER
|
||||
source drivers/power/Kconfig
|
||||
endif
|
||||
|
||||
comment "Sensor Driver Options"
|
||||
|
||||
menuconfig SENSORS
|
||||
bool "Sensors Support"
|
||||
bool "Sensor Device Support"
|
||||
default n
|
||||
---help---
|
||||
Drivers for various sensors
|
||||
@@ -379,10 +347,8 @@ if SENSORS
|
||||
source drivers/sensors/Kconfig
|
||||
endif
|
||||
|
||||
comment "Osmocom-bb Sercomm Driver Options"
|
||||
|
||||
menuconfig SERCOMM_CONSOLE
|
||||
bool "Osmocom-bb serial console"
|
||||
bool "Osmocom-bb Sercomm Driver Support"
|
||||
default n
|
||||
---help---
|
||||
Sercomm is the transport used by osmocom-bb that runs on top of serial.
|
||||
@@ -398,10 +364,8 @@ if SERCOMM
|
||||
source drivers/sercomm/Kconfig
|
||||
endif
|
||||
|
||||
comment "Serial Driver Options"
|
||||
|
||||
menuconfig SERIAL
|
||||
bool "Serial Support"
|
||||
bool "Serial Driver Support"
|
||||
default y
|
||||
---help---
|
||||
Front-end character drivers for chip-specific UARTs. This provide
|
||||
@@ -412,10 +376,8 @@ if SERIAL
|
||||
source drivers/serial/Kconfig
|
||||
endif
|
||||
|
||||
comment "USB Device Driver Options"
|
||||
|
||||
menuconfig USBDEV
|
||||
bool "USB Device Support"
|
||||
bool "USB Device Driver Support"
|
||||
default n
|
||||
---help---
|
||||
USB device drivers. See also include/nuttx/usb/usbdev.h
|
||||
@@ -424,10 +386,8 @@ if USBDEV
|
||||
source drivers/usbdev/Kconfig
|
||||
endif
|
||||
|
||||
comment "USB Host Driver Options"
|
||||
|
||||
menuconfig USBHOST
|
||||
bool "USB Host Support"
|
||||
bool "USB Host Driver Support"
|
||||
default n
|
||||
---help---
|
||||
USB host drivers. See also include/nuttx/usb/usbhost.h
|
||||
@@ -436,10 +396,8 @@ if USBHOST
|
||||
source drivers/usbhost/Kconfig
|
||||
endif
|
||||
|
||||
comment "Wireless Device Driver Options"
|
||||
|
||||
menuconfig WIRELESS
|
||||
bool "Wireless Support"
|
||||
bool "Wireless Device Support"
|
||||
default n
|
||||
---help---
|
||||
Drivers for various wireless devices.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
############################################################################
|
||||
# drivers/net/Make.defs
|
||||
#
|
||||
# Copyright (C) 2007, 2010-2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Copyright (C) 2007, 2010-2012 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
|
||||
@@ -47,7 +47,7 @@ ifeq ($(CONFIG_NET_CS89x0),y)
|
||||
CSRCS += cs89x0.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NET_ENC28J60),y)
|
||||
ifeq ($(CONFIG_ENC28J60),y)
|
||||
CSRCS += enc28j60.c
|
||||
endif
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#if defined(CONFIG_NET) && defined(CONFIG_NET_ENC28J60)
|
||||
#if defined(CONFIG_NET) && defined(CONFIG_ENC28J60)
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
/* ENC28J60 Configuration Settings:
|
||||
*
|
||||
* CONFIG_NET_ENC28J60 - Enabled ENC28J60 support
|
||||
* CONFIG_ENC28J60 - Enabled ENC28J60 support
|
||||
* CONFIG_ENC28J60_SPIMODE - Controls the SPI mode
|
||||
* CONFIG_ENC28J60_FREQUENCY - Define to use a different bus frequency
|
||||
* CONFIG_ENC28J60_NINTERFACES - Specifies the number of physical ENC28J60
|
||||
@@ -172,36 +172,36 @@ struct enc_driver_s
|
||||
{
|
||||
/* Device control */
|
||||
|
||||
bool bifup; /* true:ifup false:ifdown */
|
||||
uint8_t bank; /* Currently selected bank */
|
||||
uint16_t nextpkt; /* Next packet address */
|
||||
FAR struct enc_lower_s *lower; /* Low-level MCU-specific support */
|
||||
bool bifup; /* true:ifup false:ifdown */
|
||||
uint8_t bank; /* Currently selected bank */
|
||||
uint16_t nextpkt; /* Next packet address */
|
||||
FAR const struct enc_lower_s *lower; /* Low-level MCU-specific support */
|
||||
|
||||
/* Timing */
|
||||
|
||||
WDOG_ID txpoll; /* TX poll timer */
|
||||
WDOG_ID txtimeout; /* TX timeout timer */
|
||||
WDOG_ID txpoll; /* TX poll timer */
|
||||
WDOG_ID txtimeout; /* TX timeout timer */
|
||||
|
||||
/* We we don't own the SPI bus, then we cannot do SPI accesses from the
|
||||
* interrupt handler.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_SPI_OWNBUS
|
||||
struct work_s work; /* Work queue support */
|
||||
struct work_s work; /* Work queue support */
|
||||
#endif
|
||||
|
||||
/* This is the contained SPI driver intstance */
|
||||
|
||||
FAR struct spi_dev_s *spi;
|
||||
FAR struct spi_dev_s *spi;
|
||||
|
||||
/* This holds the information visible to uIP/NuttX */
|
||||
|
||||
struct uip_driver_s dev; /* Interface understood by uIP */
|
||||
struct uip_driver_s dev; /* Interface understood by uIP */
|
||||
|
||||
/* Statistics */
|
||||
|
||||
#ifdef CONFIG_ENC28J60_STATS
|
||||
struct enc_stats_s stats;
|
||||
struct enc_stats_s stats;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user