summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-01-07 06:23:24 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-01-07 06:23:24 -0600
commitd00ffc02d58d9364b7079893e7605d3dc00e0d98 (patch)
tree567bc30eb4b0f0cc306f903b30e44b7a27d067c7
parent628b77d359d73eace31e1b7eac1eabde538dba69 (diff)
downloadnuttx-d00ffc02d58d9364b7079893e7605d3dc00e0d98.tar.gz
nuttx-d00ffc02d58d9364b7079893e7605d3dc00e0d98.tar.bz2
nuttx-d00ffc02d58d9364b7079893e7605d3dc00e0d98.zip
Update README
-rw-r--r--nuttx/configs/dk-tm4c129x/README.txt2
-rw-r--r--nuttx/configs/stm3210e-eval/README.txt71
2 files changed, 50 insertions, 23 deletions
diff --git a/nuttx/configs/dk-tm4c129x/README.txt b/nuttx/configs/dk-tm4c129x/README.txt
index 017bf0e6f..4de213b61 100644
--- a/nuttx/configs/dk-tm4c129x/README.txt
+++ b/nuttx/configs/dk-tm4c129x/README.txt
@@ -692,7 +692,7 @@ Temperature Sensor
will read the current temperature from an LM75 compatible temperature sensor
and print the temperature on stdout in either units of degrees Fahrenheit or
Centigrade. This tiny command line application is enabled with the following
- configuratin options:
+ configuration options:
Library
CONFIG_LIBM=y
diff --git a/nuttx/configs/stm3210e-eval/README.txt b/nuttx/configs/stm3210e-eval/README.txt
index a6743c803..d3c27916b 100644
--- a/nuttx/configs/stm3210e-eval/README.txt
+++ b/nuttx/configs/stm3210e-eval/README.txt
@@ -347,28 +347,55 @@ events as follows:
Temperature Sensor
==================
-Support for the on-board LM-75 temperature sensor is available. This supported
-has been verified, but has not been included in any of the available the
-configurations. To set up the temperature sensor, add the following to the
-NuttX configuration file
-
- CONFIG_I2C=y
- CONFIG_I2C_LM75=y
-
-Then you can implement logic like the following to use the temperature sensor:
-
- #include <nuttx/sensors/lm75.h>
- #include <arch/board/board.h>
-
- ret = stm32_lm75initialize("/dev/temp"); /* Register the temperature sensor */
- fd = open("/dev/temp", O_RDONLY); /* Open the temperature sensor device */
- ret = ioctl(fd, SNIOC_FAHRENHEIT, 0); /* Select Fahrenheit */
- bytesread = read(fd, buffer, 8*sizeof(b16_t)); /* Read temperature samples */
-
-More complex temperature sensor operations are also available. See the IOCTL
-commands enumerated in include/nuttx/sensors/lm75.h. Also read the descriptions
-of the stm32_lm75initialize() and stm32_lm75attach() interfaces in the
-arch/board/board.h file (sames as configs/stm3210e-eval/include/board.h).
+ LM-75 Temperature Sensor Driver
+ -------------------------------
+ Support for the on-board LM-75 temperature sensor is available. This
+ support has been verified, but has not been included in any of the
+ available the configurations. To set up the temperature sensor, add the
+ following to the NuttX configuration file
+
+ Drivers -> Sensors
+ CONFIG_LM75=y
+ CONFIG_I2C_LM75=y
+
+ Then you can implement logic like the following to use the temperature
+ sensor:
+
+ #include <nuttx/sensors/lm75.h>
+ #include <arch/board/board.h>
+
+ ret = stm32_lm75initialize("/dev/temp"); /* Register the temperature sensor */
+ fd = open("/dev/temp", O_RDONLY); /* Open the temperature sensor device */
+ ret = ioctl(fd, SNIOC_FAHRENHEIT, 0); /* Select Fahrenheit */
+ bytesread = read(fd, buffer, 8*sizeof(b16_t)); /* Read temperature samples */
+
+ More complex temperature sensor operations are also available. See the
+ IOCTL commands enumerated in include/nuttx/sensors/lm75.h. Also read the
+ escriptions of the stm32_lm75initialize() and stm32_lm75attach()
+ interfaces in the arch/board/board.h file (sames as
+ configs/stm3210e-eval/include/board.h).
+
+ NSH Command Line Application
+ ----------------------------
+ There is a tiny NSH command line application at examples/system/lm75 that
+ will read the current temperature from an LM75 compatible temperature sensor
+ and print the temperature on stdout in either units of degrees Fahrenheit or
+ Centigrade. This tiny command line application is enabled with the following
+ configuration options:
+
+ Library
+ CONFIG_LIBM=y
+ CONFIG_LIBC_FLOATINGPOINT=y
+
+ Applications -> NSH Library
+ CONFIG_NSH_ARCHINIT=y
+
+ Applications -> System Add-Ons
+ CONFIG_SYSTEM_LM75=y
+ CONFIG_SYSTEM_LM75_DEVNAME="/dev/temp"
+ CONFIG_SYSTEM_LM75_FAHRENHEIT=y (or CENTIGRADE)
+ CONFIG_SYSTEM_LM75_STACKSIZE=1024
+ CONFIG_SYSTEM_LM75_PRIORITY=100
RTC
===