Merge remote-tracking branch 'origin/master' into vnc

This commit is contained in:
Gregory Nutt 2016-04-17 16:50:12 -06:00
commit 7b33c77336
5 changed files with 1589 additions and 31 deletions

View File

@ -16,7 +16,7 @@ config MTD_PARTITION
accesses do not extend outside of the partition.
A FLASH device may be broken up into several partitions managed,
each managed by a separate MTD driver. The MTD parition interface
each managed by a separate MTD driver. The MTD partition interface
is described in:
include/nuttx/mtd/mtd.h
@ -43,7 +43,7 @@ config MTD_SECT512
If enabled, a MTD driver will be created that will convert the
sector size of any other MTD driver to a 512 byte "apparent" sector
size. The managed MTD driver in this case must have an erase block
size that is greater than 512B and an event multiple of 512B.
size that is greater than 512B and an even multiple of 512B.
if MTD_SECT512
@ -142,7 +142,7 @@ config MTD_CONFIG_RAM_CONSOLIDATE
(For configurations that have only a single erase block assigned
to the config device, RAM consolidation is the ONLY option.)
Another apporach is to allow the driver to use the entire MTD
Another approach is to allow the driver to use the entire MTD
device (or partition) to save config data, and then allocate a
RAM buffer (the size of one erase block) to perform the
consolidation. Enabling this feature basically trades off RAM
@ -266,7 +266,7 @@ config RAMMTD_FLASHSIM
RAMMTD_FLASHSIM will add some extra logic to improve the level of
FLASH simulation.
endif
endif # RAMMTD
config FILEMTD
bool "File-based MTD driver"
@ -288,7 +288,7 @@ config FILEMTD_ERASESTATE
hex "Simulated erase state"
default 0xff
endif
endif # FILEMTD
config MTD_AT24XX
bool "I2C-based AT24xx eeprom"
@ -305,7 +305,7 @@ config AT24XX_MULTI
default n
---help---
Build in additional support for multiple AT24XX devices, each with
dynamically allocated device structures wiath a separate I2C
dynamically allocated device structures with a separate I2C
addresses (but otherwise identical -- support for multiple, different
AT24xx, devices not yet supported).
@ -334,7 +334,7 @@ config AT24XX_EXTENDED
bool "Extended memory"
default n
---help---
If the device supports extended memory, then this operion may be set
If the device supports extended memory, then this operation may be set
to enabled the MTDIOC_EXTENDED ioctl() operation. When the
extended operation is selected, calls to the driver read method will
return data from the extended memory region.
@ -353,11 +353,11 @@ config AT24XX_FREQUENCY
int "AT24xx I2C bus frequency"
default 100000
---help---
Set the I2C frequency to use when accessing the AT24CXX EEPROM. This value
must represent a valid I2C speed (normally less than 400.000) or the driver
might fail.
Set the I2C frequency to use when accessing the AT24CXX EEPROM. This value
must represent a valid I2C speed (normally less than 400.000) or the driver
might fail.
endif
endif # MTD_AT24XX
config MTD_AT25
bool "SPI-based AT25 FLASH"
@ -374,7 +374,7 @@ config AT25_SPIFREQUENCY
int "AT25 SPI Frequency"
default 20000000
endif
endif # MTD_AT25
config MTD_AT45DB
bool "SPI-based AT45DB flash"
@ -395,7 +395,7 @@ config AT45DB_PWRSAVE
bool "Enable power save"
default n
endif
endif # MTD_AT45DB
config MTD_M25P
bool "SPI-based M25P FLASH"
@ -437,7 +437,7 @@ config M25P_SUBSECTOR_ERASE
size (4K vs 64K). This option enables support for sub-sector erase.
The SMART file system can take advantage of this option if it is enabled.
endif
endif # MTD_M25P
config MTD_S25FL1
bool "QuadSPI-based S25FL1 FLASH"
@ -482,14 +482,44 @@ config S25FL1_SCRAMBLE
bool "Scramble data"
default n
---help---
Requires drviver support for data scrambling/descrambling.
Requires driver support for data scrambling/descrambling.
config S25FL1_SCRAMBLE_KEY
hex "Scramble key"
default 0x0baddead
depends on S25FL1_SCRAMBLE
endif
endif # MTD_S25FL1
config MTD_N25QXXX
bool "QuadSPI-based Micron N25QXXX family FLASH"
default n
---help---
Support the N25Q016A, N25Q032A, N25Q064A, N25Q128A, N25Q256A
if MTD_N25QXXX
config N25QXXX_QSPIMODE
int "N25QXXX QuadSPI Mode"
default 0
---help---
This device can operate in SPI mode 0 or 3.
config N25QXXX_QSPI_FREQUENCY
int "N25QXXX QuadSPI Frequency"
default 108000000
---help---
- Clock frequency for all SPI commands except for Read Data
command (0x03)
- Clock frequency for Read Data command (0x03): 54 MHz
In this implementation, only "Quad" reads are performed.
config N25QXXX_SECTOR512
bool "Simulate 512 byte Erase Blocks"
default n
endif # MTD_N25QXXX
config MTD_SMART
bool "Sector Mapped Allocation for Really Tiny (SMART) Flash support"
@ -553,7 +583,7 @@ config MTD_SMART_CONVERT_WEAR_FORMAT
CRC versions use a different header format and require a mksmartfs on the
device even if an existing format is there.
endif
endif # MTD_SMART_WEAR_LEVEL && !SMART_CRC_16
config MTD_SMART_ENABLE_CRC
bool "Enable Sector CRC error detection"
@ -588,7 +618,7 @@ config SMART_CRC_8
config SMART_CRC_16
bool "CRC-16"
endchoice
endchoice # CRC level selection
config MTD_SMART_MINIMIZE_RAM
bool "Minimize SMART RAM usage using logical sector cache"
@ -676,7 +706,7 @@ config RAMTRON_SETSPEED
Select an option to provide an ioctl, MTDIOC_SETSPEED call that
supports dynamic selection of the RAMTRON bus speed.
endif
endif # MTD_RAMTRON
config MTD_SST25
bool "SPI-based SST25 FLASH"
@ -715,7 +745,7 @@ config SST25_SLOWREAD
bool
default n
endif
endif # MTD_SST25
config MTD_SST25XX
bool "SPI-based SST25XX FLASH (64-MBit and larger)"
@ -751,7 +781,7 @@ config SST25XX_MEMORY_TYPE
The memory type for SST25VF065 series is 0x25, but this can be modified if needed
to support compatible devices from different manufacturers.
endif
endif # MTD_SST25XX
config MTD_SST39FV
bool "SST39FV NOR FLASH"
@ -770,7 +800,7 @@ config SST39VF_BASE_ADDRESS
---help---
This is the address where the SST29VF FLASH can be found in memory.
endif
endif # MTD_SST39FV
config MTD_W25
bool "SPI-based W25 FLASH"
@ -799,4 +829,4 @@ config W25_SLOWREAD
bool
default n
endif
endif # MTD_W25

View File

@ -3,7 +3,7 @@
# These driver supports various Memory Technology Devices (MTD) using the
# NuttX MTD interface.
#
# Copyright (C) 2009-2013, 2015 Gregory Nutt. All rights reserved.
# Copyright (C) 2009-2013, 2015-2016 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@ -104,6 +104,10 @@ ifeq ($(CONFIG_MTD_S25FL1),y)
CSRCS += s25fl1.c
endif
ifeq ($(CONFIG_MTD_N25QXXX),y)
CSRCS += n25qxxx.c
endif
ifeq ($(CONFIG_MTD_SMART),y)
ifeq ($(CONFIG_FS_SMARTFS),y)
CSRCS += smart.c

1511
drivers/mtd/n25qxxx.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -513,6 +513,19 @@ struct qspi_dev_s; /* Forward reference */
FAR struct mtd_dev_s *s25fl1_initialize(FAR struct qspi_dev_s *qspi,
bool unprotect);
/****************************************************************************
* Name: n25qxxx_initialize
*
* Description:
* Create an initialize MTD device instance for the QuadSPI-based N25Qxxx
* FLASH part from Micron.
*
****************************************************************************/
struct qspi_dev_s; /* Forward reference */
FAR struct mtd_dev_s *n25qxxx_initialize(FAR struct qspi_dev_s *qspi,
bool unprotect);
/****************************************************************************
* Name: up_flashinitialize
*

View File

@ -251,7 +251,7 @@ struct rfb_clientinit_s
/* 6.3.2 ServerInit
*
* "After receiving the ClientInit message, the server sends a ServerInit
* message. This tells the client the width and height of the servers
* message. This tells the client the width and height of the servers
* framebuffer, its pixel format and the name associated with the desktop:
*/
@ -547,7 +547,7 @@ struct rfb_rectangle_s
uint8_t data[1]; /* Pixel data, actual size varies */
};
#define SIZEOF_RFB_RECTANGES(n,d) \
#define SIZEOF_RFB_RECTANGES(d) \
(sizeof(struct rfb_framebufferupdate_s) + (d) - 1)
struct rfb_framebufferupdate_s
@ -558,8 +558,8 @@ struct rfb_framebufferupdate_s
struct rfb_rectangle_s rect[1]; /* Actual number is nrect */
};
#define SIZEOF_RFB_FRAMEBUFFERUPDATE_S(n,r) \
(sizeof(struct rfb_framebufferupdate_s) + (r) - sizeof(rfb_rectangle_s))
#define SIZEOF_RFB_FRAMEBUFFERUPDATE_S(r) \
(sizeof(struct rfb_framebufferupdate_s) + (r) - sizeof(struct rfb_rectangle_s))
/* 6.5.2 SetColourMapEntries
*
@ -853,7 +853,7 @@ struct rfb_subrect_s
struct rfb_srle_s
{
uint8_t length[4]; /* U32 Length */
uint8_t data[1]; /* U8 zlibData, actual size is length */
uint8_t data[1]; /* U8 zlibData, actual size is length */
};
#define SIZEOF_RFB_SRLE_S(n,r) \
@ -880,7 +880,7 @@ struct rfb_srle_s
* bottom seven bits indicate the size of the palette used - zero means no
* palette, one means that the tile is of a single colour, 2 to 127
* indicate a palette of that size. The possible values of subencoding are:"
*/
*/
#define RFB_SUBENCODING_RAW 0 /* Raw pixel data */
#define RFB_SUBENCODING_SOLID 1 /* A solid tile of a single color */
@ -1010,7 +1010,7 @@ struct rfb_palettendx_s
* byte the most significant bit represents the leftmost pixel, with a
* 1-bit meaning the corresponding pixel in the cursor is valid."
*
* REVISIT: Also difficult to represent: A variable length pixel arry
* REVISIT: Also difficult to represent: A variable length pixel array
* followed by a variable length bit mask.
*/