Fix I2C/FSMC conflict for STM32; Fix STM32 clock setup
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3942 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
ab04444d75
commit
9074172127
@ -7,6 +7,9 @@ will provide usage information for the I2C tools.
|
||||
CONTENTS
|
||||
========
|
||||
|
||||
o System Requirements
|
||||
- I2C Driver
|
||||
- Configuration Options
|
||||
o Help
|
||||
o Common Line Form
|
||||
o Common Command Options
|
||||
@ -22,6 +25,34 @@ CONTENTS
|
||||
- NuttX Configuration Requirements
|
||||
- I2C Tool Configuration Options
|
||||
|
||||
System Requirements
|
||||
===================
|
||||
|
||||
I2C Driver
|
||||
----------
|
||||
In order to use the I2C driver, you system -- in particular, your I2C driver --
|
||||
must meet certain requirements:
|
||||
|
||||
1. It support calling up_i2cinitialize() numerous times, resetting the I2C
|
||||
hardware on each (initial) time. up_i2cuninitialize() will be called after
|
||||
each call to up_i2cinitialize() to free any resources and disable the I2C.
|
||||
2. up_i2cinitialize must accept any interface number without crashing. It
|
||||
must simply return NULL if the device is not supported.
|
||||
3. The I2C driver must support the transfer method (CONFIG_I2C_TRANSFER=y).
|
||||
|
||||
The I2C tool is designed to be implemented as a NuttShell (NSH) add-on. Read
|
||||
the apps/nshlib/README.txt file for information about add-ons.
|
||||
|
||||
Configuration Options
|
||||
---------------------
|
||||
CONFIG_I2CTOOL_BUILTIN - Build the tools as an NSH built-in command
|
||||
CONFIG_I2CTOOL_MINBUS - Smallest bus index supported by the hardware (default 0).
|
||||
CONFIG_I2CTOOL_MAXBUS - Largest bus index supported by the hardware (default 3)
|
||||
CONFIG_I2CTOOL_MINADDR - Minium device address (default: 0x03)
|
||||
CONFIG_I2CTOOL_MAXADDR - Largest device address (default: 0x77)
|
||||
CONFIG_I2CTOOL_MAXREGADDR - Largest register address (default: 0xff)
|
||||
CONFIG_I2CTOOL_DEFFREQ - Default frequency (default: 4000000)
|
||||
|
||||
HELP
|
||||
====
|
||||
|
||||
@ -44,7 +75,7 @@ options.
|
||||
Where <cmd> is one of:
|
||||
|
||||
Show help: ?
|
||||
List buses: bus [OPTIONS]
|
||||
List buses: bus
|
||||
List devices: dev [OPTIONS] <first> <last>
|
||||
Read register: get [OPTIONS]
|
||||
Show help: help
|
||||
@ -56,7 +87,7 @@ options.
|
||||
[-r regaddr] is the I2C device register address (hex). Default: 00 Current: 00
|
||||
[-w width] is the data width (8 or 16 decimal). Default: 8 Current: 8
|
||||
[-s|n], send/don't send start between command and data. Default: -n Current: -n
|
||||
[-f freq] I2C frequency. Default: 400000 Current: 400000
|
||||
[-f freq] I2C frequency. Default: 100000 Current: 100000
|
||||
|
||||
NOTES:
|
||||
o An environment variable like $PATH may be used for any argument.
|
||||
|
@ -76,7 +76,7 @@ struct i2ctool_s g_i2ctool;
|
||||
static const struct cmdmap_s g_i2ccmds[] =
|
||||
{
|
||||
{ "?", cmd_help, "Show help", NULL },
|
||||
{ "bus", cmd_bus, "List busses", "[OPTIONS]" },
|
||||
{ "bus", cmd_bus, "List busses", NULL },
|
||||
{ "dev", cmd_dev, "List devices", "[OPTIONS] <first> <last>" },
|
||||
{ "get", cmd_get, "Read register", "[OPTIONS]" },
|
||||
{ "help", cmd_help, "Show help", NULL },
|
||||
|
@ -87,7 +87,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_I2CTOOL_DEFFREQ
|
||||
# define CONFIG_I2CTOOL_DEFFREQ 400000
|
||||
# define CONFIG_I2CTOOL_DEFFREQ 100000
|
||||
#endif
|
||||
|
||||
/* This is the maximum number of arguments that will be accepted for a
|
||||
|
Loading…
Reference in New Issue
Block a user