diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index eea76434f1..d78be1b141 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -12,7 +12,7 @@

NuttX RTOS Porting Guide

-

Last Updated: May 21, 2009

+

Last Updated: May 22, 2009

@@ -1017,7 +1017,7 @@ The system can be re-made subsequently by just typing make. initialized. The architecture specific details of initializing the OS will be handled here. Such things as setting up interrupt service routines, starting the - clock, and registering device drivers are some of the + clock, and registering device drivers are some of the things that are different for each processor and hardware platform.

@@ -1606,7 +1606,7 @@ extern void up_ledoff(int led);

Any user supplied data or logic can be accessed via the psuedo-file system. - Built in support is provided for character and block drivers in the + Built in support is provided for character and block drivers in the /dev psuedo file system directory.

@@ -1616,7 +1616,7 @@ extern void up_ledoff(int led); mass storage device. NuttX supports the standard mount() command that allows a block driver to be bound to a mountpoint within the psuedo file system - and to a a file system. + and to a file system. At present, NuttX supports only the VFAT file system.

@@ -1648,7 +1648,10 @@ extern void up_ledoff(int led);
  • Block Device Drivers, and
  • Other Specialized Drivers.
  • - As discussed in the following paragraphs. + These different device driver types are discussed in the following paragraphs. + Note: device driver support requires that the in-memory, psuedo file system + is enabled by setting the CONFIG_NFILE_DESCRIPTORS in the NuttX configuration file to a + non-zero value.

    6.1 Character Device Drivers

    @@ -1666,13 +1669,13 @@ extern void up_ledoff(int led); Each character device driver must implement an instance of struct file_operations. That structure defines a call table with the following methods:
  • @@ -1683,10 +1686,12 @@ extern void up_ledoff(int led);
  • User Access. - After it has been registered, the character driver can be accessed by user code using the standard functions open(), close(), read(), write(), etc. + After it has been registered, the character driver can be accessed by user code using the standard + driver operations including + open(), close(), read(), write(), etc.
  • - Examples. + Examples: drivers/dev_null.c, drivers/fifo.c, drivers/serial.c, etc.
  • @@ -1706,12 +1711,12 @@ extern void up_ledoff(int led); Each block device driver must implement an instance of struct block_operations. That structure defines a call table with the following methods:
  • @@ -1726,17 +1731,17 @@ extern void up_ledoff(int led); 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. + 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. + 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. + Example: See the cmd_dd() implementation in examples/nsh/nsh_ddcmd.c.
  • Examples. @@ -1760,7 +1765,7 @@ extern void up_ledoff(int led); Each Eterhenet driver registers itself by calling netdev_register().
  • - Examples. + Examples: drivers/net/dm90x0.c, arch/drivers/arm/src/c5471/c5471_ethernet.c, arch/z80/src/ez80/ez80_emac.c, etc.
  • @@ -1777,13 +1782,13 @@ extern void up_ledoff(int led); Each SPI device driver must implement an instance of struct spi_ops_s. That structure defines a call table with the following methods:
  • @@ -1793,7 +1798,7 @@ extern void up_ledoff(int led); See for example, int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi) in drivers/mmcsd/mmcsd_spi.c.
  • - Examples. + Examples: drivers/loop.c, drivers/mmcds/mmcsd_spi.c, drivers/ramdisk.c, etc.
  • @@ -1810,10 +1815,10 @@ extern void up_ledoff(int led); Each I2C device driver must implement an instance of struct i2c_ops_s. That structure defines a call table with the following methods:
  • Binding I2C Drivers. @@ -1821,7 +1826,7 @@ extern void up_ledoff(int led); higher level device driver.
  • - Examples. + Examples: arch/z80/src/ez80/ez80_i2c.c, arch/z80/src/z8/z8_i2c.c, etc.
  • @@ -1838,18 +1843,18 @@ extern void up_ledoff(int led); Each serial device driver must implement an instance of struct uart_ops_s. That structure defines a call table with the following methods:
  • @@ -1865,7 +1870,7 @@ extern void up_ledoff(int led); Serial drivers are, ultimately, normal character drivers and are accessed as other character drivers.
  • - Examples. + Examples: arch/arm/src/chip/lm3s_serial.c, arch/arm/src/lpc214x/lpc214x_serial.c, arch/z16/src/z16f/z16f_serial.c, etc.
  • diff --git a/Documentation/NuttxUserGuide.html b/Documentation/NuttxUserGuide.html index 63a54e7159..6a8ee1847c 100644 --- a/Documentation/NuttxUserGuide.html +++ b/Documentation/NuttxUserGuide.html @@ -13,7 +13,7 @@

    NuttX Operating System

    User's Manual

    by

    Gregory Nutt

    -

    Last Updated: May 9, 2009

    +

    Last Updated: May 22, 2009

    @@ -6037,8 +6037,11 @@ interface of the same name.

    Any user supplied data or logic can be accessed via the pseudo-file system. - Built in support is provided for character and block drivers in the - /dev pseudo file system directory. + Built in support is provided for character and block + driver nodes in the any + pseudo file system directory. + (By convention, however, all driver nodes should be in the /dev + pseudo file system directory).

    Mounted File Systems