From a236d30ab4764c205dea249a82f790730902d62a Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 9 Jan 2011 18:37:11 +0000 Subject: Add LCD driver documentation git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3239 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/Documentation/NuttxPortingGuide.html | 368 ++++++++++++++++++++++------- 1 file changed, 282 insertions(+), 86 deletions(-) diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index c392167ed..c2ed3b4d1 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -118,10 +118,11 @@ 6.3.3 I2C Device Drivers
6.3.4 Serial Device Drivers
6.3.5 Frame Buffer Drivers
- 6.3.6 Memory Technology Device Drivers
- 6.3.7 SDIO Device Drivers
- 6.3.8 USB Host-Side Drivers
- 6.3.9 USB Device-Side Drivers
+ 6.3.6 LCD Drivers
+ 6.3.7 Memory Technology Device Drivers
+ 6.3.8 SDIO Device Drivers
+ 6.3.9 USB Host-Side Drivers
+ 6.3.10 USB Device-Side Drivers
Appendix A: NuttX Configuration Settings
@@ -1128,7 +1129,7 @@ The system can be re-made subsequently by just typing make. is defined.

-

Inputs:Inputs:

6.2 Block Device Drivers

@@ -1761,10 +1772,13 @@ extern void up_ledoff(int led);

+

  • +

    int register_blockdriver(const char *path, const struct block_operations *bops, mode_t mode, void *priv);. Each block driver registers itself by calling register_blockdriver(), passing it the path where it will appear in the pseudo-file-system and it's initialized instance of struct block_operations. +

  • +

    User Access. Users do not normally access block drivers directly, rather, they access block drivers indirectly through the mount() API. The mount() API binds a block driver instance with a file system and with a mountpoint. Then the user may use the block driver to access the file system on the underlying media. Example: See the cmd_mount() implementation in examples/nsh/nsh_fscmds.c. +

  • +

    Accessing a Character Driver as a Block Device. See the loop device at drivers/loop.c. Example: See the cmd_losetup() implementation in examples/nsh/nsh_fscmds.c. +

  • +

    Accessing a Block Driver as Character Device. See the Block-to-Character (BCH) conversion logic in drivers/bch/. Example: See the cmd_dd() implementation in examples/nsh/nsh_ddcmd.c. +

  • +

    Examples. drivers/loop.c, drivers/mmcsd/mmcsd_spi.c, drivers/ramdisk.c, etc. +

  • @@ -1813,18 +1838,24 @@ extern void up_ledoff(int led); @@ -1832,10 +1863,13 @@ extern void up_ledoff(int led); -
  • - Binding SPI Drivers. - SPI drivers are not normally directly accessed by user code, but are usually bound to another, - higher level device driver. - See for example, int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi) in drivers/mmcsd/mmcsd_spi.c. - In general, the binding sequence is: - +

    +
  • +

    + Binding SPI Drivers. + SPI drivers are not normally directly accessed by user code, but are usually bound to another, + higher level device driver. + See for example, int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi) in drivers/mmcsd/mmcsd_spi.c. + In general, the binding sequence is: +

    +

    +

      +
    1. Get an instance of struct spi_dev_s from the hardware-specific SPI device driver, and
    2. +
    3. Provide that instance to the initialization method of the higher level device driver.
    4. +
    +

  • - Examples: - drivers/loop.c, drivers/mmcsd/mmcsd_spi.c, drivers/ramdisk.c, etc. +

    + Examples: + drivers/loop.c, drivers/mmcsd/mmcsd_spi.c, drivers/ramdisk.c, etc. +

  • @@ -1871,10 +1912,13 @@ extern void up_ledoff(int led);
  • - Binding I2C Drivers. - I2C drivers are not normally directly accessed by user code, but are usually bound to another, - higher level device driver. - In general, the binding sequence is: - +

    + Binding I2C Drivers. + I2C drivers are not normally directly accessed by user code, but are usually bound to another, + higher level device driver. + In general, the binding sequence is: +

    +

    +

      +
    1. Get an instance of struct i2c_dev_s from the hardware-specific I2C device driver, and
    2. +
    3. Provide that instance to the initialization method of the higher level device driver.
    4. +
    +

  • - Examples: - arch/z80/src/ez80/ez80_i2c.c, arch/z80/src/z8/z8_i2c.c, etc. +

    + Examples: + arch/z80/src/ez80/ez80_i2c.c, arch/z80/src/z8/z8_i2c.c, etc. +

  • @@ -1904,10 +1955,13 @@ extern void up_ledoff(int led); +

  • +

    int uart_register(FAR const char *path, FAR uart_dev_t *dev);. A serial driver may register itself by calling uart_register(), passing it the path where it will appear in the pseudo-file-system and it's initialized instance of struct uart_ops_s. By convention, serial device drivers are registered at paths like /dev/ttyS0, /dev/ttyS1, etc. See the uart_register() implementation in drivers/serial.c. +

  • +

    User Access. Serial drivers are, ultimately, normal character drivers and are accessed as other character drivers. +

  • +

    Examples: arch/arm/src/chip/lm3s_serial.c, arch/arm/src/lpc214x/lpc214x_serial.c, arch/z16/src/z16f/z16f_serial.c, etc. +

  • @@ -1948,13 +2009,17 @@ extern void up_ledoff(int led);

    The following are provided only if the video hardware supports RGB color mapping: -

  • - Binding Frame Buffer Drivers. - Frame buffer drivers are not normally directly accessed by user code, but are usually bound to another, - higher level device driver. - In general, the binding sequence is: +

    + Binding Frame Buffer Drivers. + Frame buffer drivers are not normally directly accessed by user code, but are usually bound to another, + higher level device driver. + In general, the binding sequence is: +

    +

    +

      +
    1. Get an instance of struct fb_vtable_s from the hardware-specific frame buffer device driver, and
    2. +
    3. Provide that instance to the initialization method of the higher level device driver.
    4. +
    +

    +
  • +
  • +

    + Examples: + arch/sim/src/up_framebuffer.c. + See also the usage of the frame buffer driver in the graphics/ directory. +

    +
  • + + +

    6.3.6 LCD Drivers

    + + -

    6.3.6 Memory Technology Device Drivers

    +

    6.3.7 Memory Technology Device Drivers

    Read/write from the specified read/write blocks: -

  • - Binding MTD Drivers. - MTD drivers are not normally directly accessed by user code, but are usually bound to another, - higher level device driver. - In general, the binding sequence is: - +

    + Binding MTD Drivers. + MTD drivers are not normally directly accessed by user code, but are usually bound to another, + higher level device driver. + In general, the binding sequence is: +

    +

    +

      +
    1. Get an instance of struct mtd_dev_s from the hardware-specific MTD device driver, and
    2. +
    3. Provide that instance to the initialization method of the higher level device driver.
    4. +
    +

  • - Examples: - drivers/mtd/m25px.c and drivers/mtd/ftl.c +

    + Examples: + drivers/mtd/m25px.c and drivers/mtd/ftl.c +

  • -

    6.3.7 SDIO Device Drivers

    +

    6.3.8 SDIO Device Drivers

  • - Binding SDIO Drivers. - SDIO drivers are not normally directly accessed by user code, but are usually bound to another, - higher level device driver. - In general, the binding sequence is: - +

    + Binding SDIO Drivers. + SDIO drivers are not normally directly accessed by user code, but are usually bound to another, + higher level device driver. + In general, the binding sequence is: +

    +

    +

      +
    1. Get an instance of struct sdio_dev_s from the hardware-specific SDIO device driver, and
    2. +
    3. Provide that instance to the initialization method of the higher level device driver.
    4. +
    +

  • - Examples: - arch/arm/src/stm32/stm32_sdio.c and drivers/mmcsd/mmcsd_sdio.c +

    + Examples: + arch/arm/src/stm32/stm32_sdio.c and drivers/mmcsd/mmcsd_sdio.c +

  • -

    6.3.8 USB Host-Side Drivers

    +

    6.3.9 USB Host-Side Drivers

    -

    6.3.9 USB Device-Side Drivers

    +

    6.3.10 USB Device-Side Drivers

    -- cgit v1.2.3