Merge branch 'master' of github.com:PX4/Firmware

This commit is contained in:
Lorenz Meier
2012-09-03 08:36:23 +02:00
159 changed files with 2188 additions and 713 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
Multirotor mixer for PX4FMU
===========================
This file defines a single mixer for a quadrotor in the + configuration, with 10% contribution from
roll and pitch and 20% contribution from yaw and no deadband.
This file defines a single mixer for a quadrotor in the + configuration. All controls
are mixed 100%.
R: 4+ 1000 1000 2000 0
R: 4+ 10000 10000 10000 0
+3 -3
View File
@@ -1,7 +1,7 @@
Multirotor mixer for PX4FMU
===========================
This file defines a single mixer for a quadrotor in the X configuration, with 10% contribution from
roll and pitch and 20% contribution from yaw and no deadband.
This file defines a single mixer for a quadrotor in the X configuration. All controls
are mixed 100%.
R: 4x 1000 1000 2000 0
R: 4x 10000 10000 10000 0
+16 -2
View File
@@ -289,5 +289,19 @@
threds to no more than 3 of each priority. Bad things happen
when the existing logic tried to created several hundred test
treads!
* apps/nshlib/nsh.h: Both CONFIG_LIBC_STRERROR and CONFIG_NSH_STRERROR
must be defined to use strerror() with NSH.
* apps/examples/*/*_main.c, system/i2c/i2c_main.c, and others: Added
configuration variable CONFIG_USER_ENTRYPOINT that may be used to change
the default entry from user_start to some other symbol. Contributed by
Kate.
* apps/netutils/webserver/httpd/c: Fix a typo that as introduced in
version r4402: 'lese' instead of 'else' (Noted by Max Holtzberg).
* tools/mkfsdata.pl: The uIP web server CGI image making perl script was
moved from apps/netutils/webserver/makefsdata to nuttx/tools/mkfsdata.pl
(Part of a larger change submitted by Max Holtzberg).
* apps/netutils/webserver, apps/examples/uip, and apps/include/netutils/httpd.h:
The "canned" version of the uIP web servers content that was at
netutils/webserver/httpd_fsdata.c has been replaced with a dynamically
built configuration located at apps/examples/uip (Contributed by
Max Holtzberg).
+1 -1
View File
@@ -118,7 +118,7 @@ the NuttX configuration file:
CONFIG_BUILTIN_APP_START=<application name>
that application shall be invoked immediately after system starts
*instead* of the normal, default "user_start" entry point.
*instead* of the default "user_start" entry point.
Note that <application name> must be provided as: "hello",
will call:
+8 -4
View File
@@ -1345,10 +1345,14 @@ examples/uip
file in the configuration driver with instruction to build applications
like:
CONFIGURED_APPS += uiplib
CONFIGURED_APPS += dhcpc
CONFIGURED_APPS += resolv
CONFIGURED_APPS += webserver
CONFIGURED_APPS += uiplib
CONFIGURED_APPS += dhcpc
CONFIGURED_APPS += resolv
CONFIGURED_APPS += webserver
NOTE: This example does depend on the perl script at
nuttx/tools/mkfsdata.pl. You must have perl installed on your
development system at /usr/bin/perl.
examples/usbserial
^^^^^^^^^^^^^^^^^^
+11 -19
View File
@@ -57,14 +57,6 @@
* Pre-processor Definitions
****************************************************************************/
#ifdef CONFIG_NSH_BUILTIN_APPS
# define MAIN_NAME adc_main
# define MAIN_STRING "adc_main: "
#else
# define MAIN_NAME user_start
# define MAIN_STRING "user_start: "
#endif
/****************************************************************************
* Private Types
****************************************************************************/
@@ -223,10 +215,10 @@ static void parse_args(FAR struct adc_state_s *adc, int argc, FAR char **argv)
****************************************************************************/
/****************************************************************************
* Name: user_start/adc_main
* Name: adc_main
****************************************************************************/
int MAIN_NAME(int argc, char *argv[])
int adc_main(int argc, char *argv[])
{
struct adc_msg_s sample[CONFIG_EXAMPLES_ADC_GROUPSIZE];
size_t readsize;
@@ -244,11 +236,11 @@ int MAIN_NAME(int argc, char *argv[])
* this test.
*/
message(MAIN_STRING "Initializing external ADC device\n");
message("adc_main: Initializing external ADC device\n");
ret = adc_devinit();
if (ret != OK)
{
message(MAIN_STRING "adc_devinit failed: %d\n", ret);
message("adc_main: adc_devinit failed: %d\n", ret);
errval = 1;
goto errout;
}
@@ -276,18 +268,18 @@ int MAIN_NAME(int argc, char *argv[])
*/
#if defined(CONFIG_NSH_BUILTIN_APPS) || defined(CONFIG_EXAMPLES_ADC_NSAMPLES)
message(MAIN_STRING "g_adcstate.count: %d\n", g_adcstate.count);
message("adc_main: g_adcstate.count: %d\n", g_adcstate.count);
#endif
/* Open the ADC device for reading */
message(MAIN_STRING "Hardware initialized. Opening the ADC device: %s\n",
message("adc_main: Hardware initialized. Opening the ADC device: %s\n",
g_adcstate.devpath);
fd = open(g_adcstate.devpath, O_RDONLY);
if (fd < 0)
{
message(MAIN_STRING "open %s failed: %d\n", g_adcstate.devpath, errno);
message("adc_main: open %s failed: %d\n", g_adcstate.devpath, errno);
errval = 2;
goto errout_with_dev;
}
@@ -322,17 +314,17 @@ int MAIN_NAME(int argc, char *argv[])
errval = errno;
if (errval != EINTR)
{
message(MAIN_STRING "read %s failed: %d\n",
message("adc_main: read %s failed: %d\n",
g_adcstate.devpath, errval);
errval = 3;
goto errout_with_dev;
}
message(MAIN_STRING "Interrupted read...\n");
message("adc_main: Interrupted read...\n");
}
else if (nbytes == 0)
{
message(MAIN_STRING "No data read, Ignoring\n");
message("adc_main: No data read, Ignoring\n");
}
/* Print the sample data on successful return */
@@ -342,7 +334,7 @@ int MAIN_NAME(int argc, char *argv[])
int nsamples = nbytes / sizeof(struct adc_msg_s);
if (nsamples * sizeof(struct adc_msg_s) != nbytes)
{
message(MAIN_STRING "read size=%d is not a multiple of sample size=%d, Ignoring\n",
message("adc_main: read size=%d is not a multiple of sample size=%d, Ignoring\n",
nbytes, sizeof(struct adc_msg_s));
}
else
+2 -12
View File
@@ -130,16 +130,6 @@
#define NUM_BUTTONS (MAX_BUTTON - MIN_BUTTON + 1)
#define BUTTON_INDEX(b) ((b)-MIN_BUTTON)
/* Is this being built as an NSH built-in application? */
#ifdef CONFIG_NSH_BUILTIN_APPS
# define MAIN_NAME buttons_main
# define MAIN_STRING "buttons_main: "
#else
# define MAIN_NAME user_start
# define MAIN_STRING "user_start: "
#endif
/****************************************************************************
* Private Types
****************************************************************************/
@@ -399,10 +389,10 @@ static int button7_handler(int irq, FAR void *context)
****************************************************************************/
/****************************************************************************
* user_start/buttons_main
* buttons_main
****************************************************************************/
int MAIN_NAME(int argc, char *argv[])
int buttons_main(int argc, char *argv[])
{
uint8_t newset;
irqstate_t flags;
+8 -16
View File
@@ -76,14 +76,6 @@
# define MAX_ID (1 << 11)
#endif
#ifdef CONFIG_NSH_BUILTIN_APPS
# define MAIN_NAME can_main
# define MAIN_STRING "can_main: "
#else
# define MAIN_NAME user_start
# define MAIN_STRING "user_start: "
#endif
/****************************************************************************
* Private Types
****************************************************************************/
@@ -109,10 +101,10 @@
****************************************************************************/
/****************************************************************************
* Name: user_start/can_main
* Name: can_main
****************************************************************************/
int MAIN_NAME(int argc, char *argv[])
int can_main(int argc, char *argv[])
{
#ifndef CONFIG_EXAMPLES_CAN_READONLY
struct can_msg_s txmsg;
@@ -150,31 +142,31 @@ int MAIN_NAME(int argc, char *argv[])
{
nmsgs = strtol(argv[1], NULL, 10);
}
message(MAIN_STRING "nmsgs: %d\n", nmsgs);
message("can_main: nmsgs: %d\n", nmsgs);
#elif defined(CONFIG_EXAMPLES_CAN_NMSGS)
message(MAIN_STRING "nmsgs: %d\n", CONFIG_EXAMPLES_CAN_NMSGS);
message("can_main: nmsgs: %d\n", CONFIG_EXAMPLES_CAN_NMSGS);
#endif
/* Initialization of the CAN hardware is performed by logic external to
* this test.
*/
message(MAIN_STRING "Initializing external CAN device\n");
message("can_main: Initializing external CAN device\n");
ret = can_devinit();
if (ret != OK)
{
message(MAIN_STRING "can_devinit failed: %d\n", ret);
message("can_main: can_devinit failed: %d\n", ret);
errval = 1;
goto errout;
}
/* Open the CAN device for reading */
message(MAIN_STRING "Hardware initialized. Opening the CAN device\n");
message("can_main: Hardware initialized. Opening the CAN device\n");
fd = open(CONFIG_EXAMPLES_CAN_DEVPATH, CAN_OFLAGS);
if (fd < 0)
{
message(MAIN_STRING "open %s failed: %d\n",
message("can_main: open %s failed: %d\n",
CONFIG_EXAMPLES_CAN_DEVPATH, errno);
errval = 2;
goto errout_with_dev;
+2 -8
View File
@@ -53,16 +53,10 @@
****************************************************************************/
/****************************************************************************
* user_start/hello_main
* hello_main
****************************************************************************/
#ifdef CONFIG_EXAMPLES_HELLO_BUILTIN
# define MAIN_NAME hello_main
#else
# define MAIN_NAME user_start
#endif
int MAIN_NAME(int argc, char *argv[])
int hello_main(int argc, char *argv[])
{
printf("Hello, World!!\n");
return 0;
+5 -18
View File
@@ -124,24 +124,11 @@ static CHelloWorld g_HelloWorld;
// Public Functions
//***************************************************************************
//***************************************************************************
// user_start
//***************************************************************************
/****************************************************************************
* Name: user_start/nxhello_main
* Name: helloxx_main
****************************************************************************/
#ifdef CONFIG_EXAMPLES_HELLOXX_BUILTIN
extern "C" int helloxx_main(int argc, char *argv[]);
# define MAIN_NAME helloxx_main
# define MAIN_STRING "helloxx_main: "
#else
# define MAIN_NAME user_start
# define MAIN_STRING "user_start: "
#endif
int MAIN_NAME(int argc, char *argv[])
int helloxx_main(int argc, char *argv[])
{
// If C++ initialization for static constructors is supported, then do
// that first
@@ -153,7 +140,7 @@ int MAIN_NAME(int argc, char *argv[])
// Exercise an explictly instantiated C++ object
CHelloWorld *pHelloWorld = new CHelloWorld;
printf(MAIN_STRING "Saying hello from the dynamically constructed instance\n");
printf("helloxx_main: Saying hello from the dynamically constructed instance\n");
pHelloWorld->HelloWorld();
// Exercise an C++ object instantiated on the stack
@@ -161,14 +148,14 @@ int MAIN_NAME(int argc, char *argv[])
#ifndef CONFIG_EXAMPLES_HELLOXX_NOSTACKCONST
CHelloWorld HelloWorld;
printf(MAIN_STRING "Saying hello from the instance constructed on the stack\n");
printf("helloxx_main: Saying hello from the instance constructed on the stack\n");
HelloWorld.HelloWorld();
#endif
// Exercise an statically constructed C++ object
#ifdef CONFIG_HAVE_CXXINITIALIZE
printf(MAIN_STRING "Saying hello from the statically constructed instance\n");
printf("helloxx_main: Saying hello from the statically constructed instance\n");
g_HelloWorld.HelloWorld();
#endif
+2 -8
View File
@@ -152,16 +152,10 @@ static inline int lcdrw_initialize(FAR struct lcdrw_instance_s *inst)
****************************************************************************/
/****************************************************************************
* Name: lcdrw_main/user_start
* Name: lcdrw_main
****************************************************************************/
#ifdef CONFIG_EXAMPLES_LCDRW_BUILTIN
# define MAIN_NAME lcdrw_main
#else
# define MAIN_NAME user_start
#endif
int MAIN_NAME(int argc, char *argv[])
int lcdrw_main(int argc, char *argv[])
{
struct lcdrw_instance_s inst;
nxgl_coord_t row;
+2 -2
View File
@@ -267,10 +267,10 @@ static void do_frees(void **mem, const int *size, const int *seq, int n)
****************************************************************************/
/****************************************************************************
* Name: user_start
* Name: mm_main
****************************************************************************/
int user_start(int argc, char *argv[])
int mm_main(int argc, char *argv[])
{
mm_showmallinfo();
+8 -8
View File
@@ -567,10 +567,10 @@ static void succeed_stat(const char *path)
****************************************************************************/
/****************************************************************************
* Name: user_start
* Name: mount_main
****************************************************************************/
int user_start(int argc, char *argv[])
int mount_main(int argc, char *argv[])
{
int ret;
@@ -580,18 +580,18 @@ int user_start(int argc, char *argv[])
ret = create_ramdisk();
if (ret < 0)
{
printf("user_start: ERROR failed to create RAM disk\n");
printf("mount_main: ERROR failed to create RAM disk\n");
return 1;
}
#endif
/* Mount the test file system (see arch/sim/src/up_deviceimage.c */
printf("user_start: mounting %s filesystem at target=%s with source=%s\n",
printf("mount_main: mounting %s filesystem at target=%s with source=%s\n",
g_filesystemtype, g_target, g_source);
ret = mount(g_source, g_target, g_filesystemtype, 0, NULL);
printf("user_start: mount() returned %d\n", ret);
printf("mount_main: mount() returned %d\n", ret);
if (ret == 0)
{
@@ -737,16 +737,16 @@ int user_start(int argc, char *argv[])
/* Unmount the file system */
printf("user_start: Try unmount(%s)\n", g_target);
printf("mount_main: Try unmount(%s)\n", g_target);
ret = umount(g_target);
if (ret != 0)
{
printf("user_start: ERROR umount() failed, errno %d\n", errno);
printf("mount_main: ERROR umount() failed, errno %d\n", errno);
g_nerrors++;
}
printf("user_start: %d errors reported\n", g_nerrors);
printf("mount_main: %d errors reported\n", g_nerrors);
}
fflush(stdout);
+2 -2
View File
@@ -84,10 +84,10 @@
****************************************************************************/
/****************************************************************************
* Name: user_start
* Name: nsh_main
****************************************************************************/
int user_start(int argc, char *argv[])
int nsh_main(int argc, char *argv[])
{
int exitval = 0;
int ret;
+2 -2
View File
@@ -58,10 +58,10 @@
****************************************************************************/
/****************************************************************************
* Name: user_start
* Name: null_main
****************************************************************************/
int user_start(int argc, char *argv[])
int null_main(int argc, char *argv[])
{
return 0;
}
+12 -20
View File
@@ -409,7 +409,7 @@ static int user_main(int argc, char *argv[])
check_test_memory_usage();
#endif /* CONFIG_PRIORITY_INHERITANCE && !CONFIG_DISABLE_SIGNALS && !CONFIG_DISABLE_PTHREAD */
/* Compare memory usage at time user_start started until
/* Compare memory usage at time ostest_main started until
* user_main exits. These should not be identical, but should
* be similar enough that we can detect any serious OS memory
* leaks.
@@ -458,18 +458,10 @@ static void stdio_test(void)
****************************************************************************/
/****************************************************************************
* user_start/ostest_main
* ostest_main
****************************************************************************/
#ifdef CONFIG_EXAMPLES_OSTEST_BUILTIN
# define MAIN_NAME ostest_main
# define MAIN_STRING "ostest_main: "
#else
# define MAIN_NAME user_start
# define MAIN_STRING "user_start: "
#endif
int MAIN_NAME(int argc, char *argv[])
int ostest_main(int argc, char *argv[])
{
int result;
@@ -492,19 +484,19 @@ int MAIN_NAME(int argc, char *argv[])
/* Set up some environment variables */
#ifndef CONFIG_DISABLE_ENVIRON
printf(MAIN_STRING "putenv(%s)\n", g_putenv_value);
printf("ostest_main: putenv(%s)\n", g_putenv_value);
putenv(g_putenv_value); /* Varaible1=BadValue3 */
printf(MAIN_STRING "setenv(%s, %s, TRUE)\n", g_var1_name, g_var1_value);
printf("ostest_main: setenv(%s, %s, TRUE)\n", g_var1_name, g_var1_value);
setenv(g_var1_name, g_var1_value, TRUE); /* Variable1=GoodValue1 */
printf(MAIN_STRING "setenv(%s, %s, FALSE)\n", g_var2_name, g_bad_value1);
printf("ostest_main: setenv(%s, %s, FALSE)\n", g_var2_name, g_bad_value1);
setenv(g_var2_name, g_bad_value1, FALSE); /* Variable2=BadValue1 */
printf(MAIN_STRING "setenv(%s, %s, TRUE)\n", g_var2_name, g_var2_value);
printf("ostest_main: setenv(%s, %s, TRUE)\n", g_var2_name, g_var2_value);
setenv(g_var2_name, g_var2_value, TRUE); /* Variable2=GoodValue2 */
printf(MAIN_STRING "setenv(%s, %s, FALSE)\n", g_var3_name, g_var3_name);
printf("ostest_main: setenv(%s, %s, FALSE)\n", g_var3_name, g_var3_name);
setenv(g_var3_name, g_var3_value, FALSE); /* Variable3=GoodValue3 */
printf(MAIN_STRING "setenv(%s, %s, FALSE)\n", g_var3_name, g_var3_name);
printf("ostest_main: setenv(%s, %s, FALSE)\n", g_var3_name, g_var3_name);
setenv(g_var3_name, g_bad_value2, FALSE); /* Variable3=GoodValue3 */
show_environment(true, true, true);
#endif
@@ -518,13 +510,13 @@ int MAIN_NAME(int argc, char *argv[])
#endif
if (result == ERROR)
{
printf(MAIN_STRING "ERROR Failed to start user_main\n");
printf("ostest_main: ERROR Failed to start user_main\n");
}
else
{
printf(MAIN_STRING "Started user_main at PID=%d\n", result);
printf("ostest_main: Started user_main at PID=%d\n", result);
}
printf(MAIN_STRING "Exitting\n");
printf("ostest_main: Exitting\n");
return 0;
}
+23 -23
View File
@@ -69,21 +69,21 @@
****************************************************************************/
/****************************************************************************
* Name: user_start
* Name: pipe_main
****************************************************************************/
int user_start(int argc, char *argv[])
int pipe_main(int argc, char *argv[])
{
int filedes[2];
int ret;
/* Test FIFO logic */
printf("\nuser_start: Performing FIFO test\n");
printf("\npipe_main: Performing FIFO test\n");
ret = mkfifo(FIFO_PATH1, 0666);
if (ret < 0)
{
fprintf(stderr, "user_start: mkfifo failed with errno=%d\n", errno);
fprintf(stderr, "pipe_main: mkfifo failed with errno=%d\n", errno);
return 1;
}
@@ -96,7 +96,7 @@ int user_start(int argc, char *argv[])
filedes[1] = open(FIFO_PATH1, O_WRONLY);
if (filedes[1] < 0)
{
fprintf(stderr, "user_start: Failed to open FIFO %s for writing, errno=%d\n",
fprintf(stderr, "pipe_main: Failed to open FIFO %s for writing, errno=%d\n",
FIFO_PATH1, errno);
return 2;
}
@@ -104,11 +104,11 @@ int user_start(int argc, char *argv[])
filedes[0] = open(FIFO_PATH1, O_RDONLY);
if (filedes[0] < 0)
{
fprintf(stderr, "user_start: Failed to open FIFO %s for reading, errno=%d\n",
fprintf(stderr, "pipe_main: Failed to open FIFO %s for reading, errno=%d\n",
FIFO_PATH1, errno);
if (close(filedes[1]) != 0)
{
fprintf(stderr, "user_start: close failed: %d\n", errno);
fprintf(stderr, "pipe_main: close failed: %d\n", errno);
}
return 3;
}
@@ -118,28 +118,28 @@ int user_start(int argc, char *argv[])
ret = transfer_test(filedes[0], filedes[1]);
if (close(filedes[0]) != 0)
{
fprintf(stderr, "user_start: close failed: %d\n", errno);
fprintf(stderr, "pipe_main: close failed: %d\n", errno);
}
if (close(filedes[1]) != 0)
{
fprintf(stderr, "user_start: close failed: %d\n", errno);
fprintf(stderr, "pipe_main: close failed: %d\n", errno);
}
/* unlink(FIFO_PATH1); fails */
if (ret != 0)
{
fprintf(stderr, "user_start: FIFO test FAILED (%d)\n", ret);
fprintf(stderr, "pipe_main: FIFO test FAILED (%d)\n", ret);
return 4;
}
printf("user_start: FIFO test PASSED\n");
printf("pipe_main: FIFO test PASSED\n");
/* Test PIPE logic */
printf("\nuser_start: Performing pipe test\n");
printf("\npipe_main: Performing pipe test\n");
ret = pipe(filedes);
if (ret < 0)
{
fprintf(stderr, "user_start: pipe failed with errno=%d\n", errno);
fprintf(stderr, "pipe_main: pipe failed with errno=%d\n", errno);
return 5;
}
@@ -148,41 +148,41 @@ int user_start(int argc, char *argv[])
ret = transfer_test(filedes[0], filedes[1]);
if (close(filedes[0]) != 0)
{
fprintf(stderr, "user_start: close failed: %d\n", errno);
fprintf(stderr, "pipe_main: close failed: %d\n", errno);
}
if (close(filedes[1]) != 0)
{
fprintf(stderr, "user_start: close failed: %d\n", errno);
fprintf(stderr, "pipe_main: close failed: %d\n", errno);
}
if (ret != 0)
{
fprintf(stderr, "user_start: PIPE test FAILED (%d)\n", ret);
fprintf(stderr, "pipe_main: PIPE test FAILED (%d)\n", ret);
return 6;
}
printf("user_start: PIPE test PASSED\n");
printf("pipe_main: PIPE test PASSED\n");
/* Perform the FIFO interlock test */
printf("\nuser_start: Performing pipe interlock test\n");
printf("\npipe_main: Performing pipe interlock test\n");
ret = interlock_test();
if (ret != 0)
{
fprintf(stderr, "user_start: FIFO interlock test FAILED (%d)\n", ret);
fprintf(stderr, "pipe_main: FIFO interlock test FAILED (%d)\n", ret);
return 7;
}
printf("user_start: PIPE interlock test PASSED\n");
printf("pipe_main: PIPE interlock test PASSED\n");
/* Perform the pipe redirection test */
printf("\nuser_start: Performing redirection test\n");
printf("\npipe_main: Performing redirection test\n");
ret = redirection_test();
if (ret != 0)
{
fprintf(stderr, "user_start: FIFO redirection test FAILED (%d)\n", ret);
fprintf(stderr, "pipe_main: FIFO redirection test FAILED (%d)\n", ret);
return 7;
}
printf("user_start: PIPE redirection test PASSED\n");
printf("pipe_main: PIPE redirection test PASSED\n");
fflush(stdout);
return 0;
+3 -3
View File
@@ -301,16 +301,16 @@ int redirection_test(void)
if (close(filedes[0]) != 0)
{
fprintf(stderr, "user_start: close failed: %d\n", errno);
fprintf(stderr, "pipe_main: close failed: %d\n", errno);
}
if (close(filedes[1]) != 0)
{
fprintf(stderr, "user_start: close failed: %d\n", errno);
fprintf(stderr, "pipe_main: close failed: %d\n", errno);
}
if (ret != 0)
{
fprintf(stderr, "user_start: PIPE test FAILED (%d)\n", ret);
fprintf(stderr, "pipe_main: PIPE test FAILED (%d)\n", ret);
return 6;
}
+18 -18
View File
@@ -74,10 +74,10 @@
****************************************************************************/
/****************************************************************************
* Name: user_start
* Name: poll_main
****************************************************************************/
int user_start(int argc, char *argv[])
int poll_main(int argc, char *argv[])
{
char buffer[64];
ssize_t nbytes;
@@ -94,20 +94,20 @@ int user_start(int argc, char *argv[])
/* Open FIFOs */
message("\nuser_start: Creating FIFO %s\n", FIFO_PATH1);
message("\npoll_main: Creating FIFO %s\n", FIFO_PATH1);
ret = mkfifo(FIFO_PATH1, 0666);
if (ret < 0)
{
message("user_start: mkfifo failed: %d\n", errno);
message("poll_main: mkfifo failed: %d\n", errno);
exitcode = 1;
goto errout;
}
message("\nuser_start: Creating FIFO %s\n", FIFO_PATH2);
message("\npoll_main: Creating FIFO %s\n", FIFO_PATH2);
ret = mkfifo(FIFO_PATH2, 0666);
if (ret < 0)
{
message("user_start: mkfifo failed: %d\n", errno);
message("poll_main: mkfifo failed: %d\n", errno);
exitcode = 2;
goto errout;
}
@@ -117,7 +117,7 @@ int user_start(int argc, char *argv[])
fd1 = open(FIFO_PATH1, O_WRONLY);
if (fd1 < 0)
{
message("user_start: Failed to open FIFO %s for writing, errno=%d\n",
message("poll_main: Failed to open FIFO %s for writing, errno=%d\n",
FIFO_PATH1, errno);
exitcode = 3;
goto errout;
@@ -126,7 +126,7 @@ int user_start(int argc, char *argv[])
fd2 = open(FIFO_PATH2, O_WRONLY);
if (fd2 < 0)
{
message("user_start: Failed to open FIFO %s for writing, errno=%d\n",
message("poll_main: Failed to open FIFO %s for writing, errno=%d\n",
FIFO_PATH2, errno);
exitcode = 4;
goto errout;
@@ -134,39 +134,39 @@ int user_start(int argc, char *argv[])
/* Start the listeners */
message("user_start: Starting poll_listener thread\n");
message("poll_main: Starting poll_listener thread\n");
ret = pthread_create(&tid1, NULL, poll_listener, NULL);
if (ret != 0)
{
message("user_start: Failed to create poll_listener thread: %d\n", ret);
message("poll_main: Failed to create poll_listener thread: %d\n", ret);
exitcode = 5;
goto errout;
}
message("user_start: Starting select_listener thread\n");
message("poll_main: Starting select_listener thread\n");
ret = pthread_create(&tid2, NULL, select_listener, NULL);
if (ret != 0)
{
message("user_start: Failed to create select_listener thread: %d\n", ret);
message("poll_main: Failed to create select_listener thread: %d\n", ret);
exitcode = 6;
goto errout;
}
#ifdef HAVE_NETPOLL
#ifdef CONFIG_NET_TCPBACKLOG
message("user_start: Starting net_listener thread\n");
message("poll_main: Starting net_listener thread\n");
ret = pthread_create(&tid3, NULL, net_listener, NULL);
#else
message("user_start: Starting net_reader thread\n");
message("poll_main: Starting net_reader thread\n");
ret = pthread_create(&tid3, NULL, net_reader, NULL);
#endif
if (ret != 0)
{
message("user_start: Failed to create net_listener thread: %d\n", ret);
message("poll_main: Failed to create net_listener thread: %d\n", ret);
}
#endif
@@ -182,7 +182,7 @@ int user_start(int argc, char *argv[])
nbytes = write(fd1, buffer, strlen(buffer));
if (nbytes < 0)
{
message("user_start: Write to fd1 failed: %d\n", errno);
message("poll_main: Write to fd1 failed: %d\n", errno);
exitcode = 7;
goto errout;
}
@@ -190,12 +190,12 @@ int user_start(int argc, char *argv[])
nbytes = write(fd2, buffer, strlen(buffer));
if (nbytes < 0)
{
message("user_start: Write fd2 failed: %d\n", errno);
message("poll_main: Write fd2 failed: %d\n", errno);
exitcode = 8;
goto errout;
}
message("\nuser_start: Sent '%s' (%d bytes)\n", buffer, nbytes);
message("\npoll_main: Sent '%s' (%d bytes)\n", buffer, nbytes);
msgflush();
/* Wait awhile. This delay should be long enough that the
+1 -1
View File
@@ -269,7 +269,7 @@ static void parse_args(FAR struct pwm_state_s *pwm, int argc, FAR char **argv)
****************************************************************************/
/****************************************************************************
* Name: user_start/pwm_main
* Name: pwm_main
****************************************************************************/
int pwm_main(int argc, char *argv[])
+12 -20
View File
@@ -59,14 +59,6 @@
* Pre-processor Definitions
****************************************************************************/
#ifdef CONFIG_NSH_BUILTIN_APPS
# define MAIN_NAME qe_main
# define MAIN_STRING "qe_main: "
#else
# define MAIN_NAME user_start
# define MAIN_STRING "user_start: "
#endif
/****************************************************************************
* Private Types
****************************************************************************/
@@ -245,10 +237,10 @@ static void parse_args(int argc, FAR char **argv)
****************************************************************************/
/****************************************************************************
* Name: user_start/qe_main
* Name: qe_main
****************************************************************************/
int MAIN_NAME(int argc, char *argv[])
int qe_main(int argc, char *argv[])
{
int32_t position;
int fd;
@@ -266,11 +258,11 @@ int MAIN_NAME(int argc, char *argv[])
* this test.
*/
message(MAIN_STRING "Initializing external encoder(s)\n");
message("qe_main: Initializing external encoder(s)\n");
ret = qe_devinit();
if (ret != OK)
{
message(MAIN_STRING "qe_devinit failed: %d\n", ret);
message("qe_main: qe_devinit failed: %d\n", ret);
exitval = EXIT_FAILURE;
goto errout;
}
@@ -289,13 +281,13 @@ int MAIN_NAME(int argc, char *argv[])
/* Open the encoder device for reading */
message(MAIN_STRING "Hardware initialized. Opening the encoder device: %s\n",
message("qe_main: Hardware initialized. Opening the encoder device: %s\n",
g_qeexample.devpath);
fd = open(g_qeexample.devpath, O_RDONLY);
if (fd < 0)
{
message(MAIN_STRING "open %s failed: %d\n", g_qeexample.devpath, errno);
message("qe_main: open %s failed: %d\n", g_qeexample.devpath, errno);
exitval = EXIT_FAILURE;
goto errout_with_dev;
}
@@ -304,11 +296,11 @@ int MAIN_NAME(int argc, char *argv[])
if (g_qeexample.reset)
{
message(MAIN_STRING "Resetting the count...\n");
message("qe_main: Resetting the count...\n");
ret = ioctl(fd, QEIOC_RESET, 0);
if (ret < 0)
{
message(MAIN_STRING "ioctl(QEIOC_RESET) failed: %d\n", errno);
message("qe_main: ioctl(QEIOC_RESET) failed: %d\n", errno);
exitval = EXIT_FAILURE;
goto errout_with_dev;
}
@@ -319,10 +311,10 @@ int MAIN_NAME(int argc, char *argv[])
*/
#if defined(CONFIG_NSH_BUILTIN_APPS)
message(MAIN_STRING "Number of samples: %d\n", g_qeexample.nloops);
message("qe_main: Number of samples: %d\n", g_qeexample.nloops);
for (nloops = 0; nloops < g_qeexample.nloops; nloops++)
#elif defined(CONFIG_EXAMPLES_QENCODER_NSAMPLES)
message(MAIN_STRING "Number of samples: %d\n", CONFIG_EXAMPLES_QENCODER_NSAMPLES);
message("qe_main: Number of samples: %d\n", CONFIG_EXAMPLES_QENCODER_NSAMPLES);
for (nloops = 0; nloops < CONFIG_EXAMPLES_QENCODER_NSAMPLES; nloops++)
#else
for (;;)
@@ -339,7 +331,7 @@ int MAIN_NAME(int argc, char *argv[])
ret = ioctl(fd, QEIOC_POSITION, (unsigned long)((uintptr_t)&position));
if (ret < 0)
{
message(MAIN_STRING "ioctl(QEIOC_POSITION) failed: %d\n", errno);
message("qe_main: ioctl(QEIOC_POSITION) failed: %d\n", errno);
exitval = EXIT_FAILURE;
goto errout_with_dev;
}
@@ -348,7 +340,7 @@ int MAIN_NAME(int argc, char *argv[])
else
{
message(MAIN_STRING "%3d. %d\n", nloops+1, position);
message("qe_main: %3d. %d\n", nloops+1, position);
}
/* Delay a little bit */
+2 -2
View File
@@ -452,10 +452,10 @@ static void checkdirectories(struct node_s *entry)
****************************************************************************/
/****************************************************************************
* Name: user_start
* Name: romfs_main
****************************************************************************/
int user_start(int argc, char *argv[])
int romfs_main(int argc, char *argv[])
{
int ret;
+2 -2
View File
@@ -56,10 +56,10 @@
****************************************************************************/
/****************************************************************************
* user_start
* serloop_main
****************************************************************************/
int user_start(int argc, char *argv[])
int serloop_main(int argc, char *argv[])
{
#ifdef CONFIG_EXAMPLES_SERLOOP_BUFIO
int ch;
+1 -1
View File
@@ -217,7 +217,7 @@ static void parse_args(FAR struct wdog_example_s *wdog, int argc, FAR char **arg
****************************************************************************/
/****************************************************************************
* Name: user_start/wdog_main
* Name: wdog_main
****************************************************************************/
int wdog_main(int argc, char *argv[])
+1 -1
View File
@@ -58,7 +58,7 @@ pcode
Pascal P-Code at runtime. To use this example, place the following in
your appconfig file"
# Path to example in apps/examples containing the user_start entry point
# Path to example in apps/examples containing the passhello_main entry point
CONFIGURED_APPS += examples/pashello
@@ -217,7 +217,7 @@ void multirotor_control_attitude(const struct vehicle_attitude_setpoint_s *att_s
PID_MODE_DERIVATIV_CALC, 155);
pid_init(&pitch_controller, p.att_p, p.att_i, p.att_d, p.att_awu,
PID_MODE_DERIVATIV_SET, 156);
pid_init(&roll_controller, p.att_d, p.att_i, p.att_d, p.att_awu,
pid_init(&roll_controller, p.att_p, p.att_i, p.att_d, p.att_awu,
PID_MODE_DERIVATIV_SET, 157);
initialized = true;
+3
View File
@@ -148,9 +148,12 @@ config NSH_FILEIOSIZE
config NSH_STRERROR
bool "Use strerror()"
default n
depends on LIBC_STRERROR
---help---
strerror(errno) makes more readable output but strerror() is
very large and will not be used unless this setting is 'y'
This setting depends upon the strerror() having been enabled
with LIBC_STRERROR.
config NSH_LINELEN
int "Max command line length"
+3 -1
View File
@@ -915,7 +915,9 @@ NSH-Specific Configuration Settings
* CONFIG_NSH_STRERROR
strerror(errno) makes more readable output but strerror() is
very large and will not be used unless this setting is 'y'
very large and will not be used unless this setting is 'y'.
This setting depends upon the strerror() having been enabled
with CONFIG_LIBC_STRERROR.
* CONFIG_NSH_LINELEN
The maximum length of one command line and of one output line.
+6 -1
View File
@@ -238,9 +238,14 @@
#define NSH_MAX_ARGUMENTS 6
/* strerror() produces much nicer output but is, however, quite large and
* will only be used if CONFIG_NSH_STRERROR is defined.
* will only be used if CONFIG_NSH_STRERROR is defined. Note that the strerror
* interface must also have been enabled with CONFIG_LIBC_STRERROR.
*/
#ifndef CONFIG_LIBC_STRERROR
# undef CONFIG_NSH_STRERROR
#endif
#ifdef CONFIG_NSH_STRERROR
# define NSH_ERRNO strerror(errno)
# define NSH_ERRNO_OF(err) strerror(err)
+1 -9
View File
@@ -351,15 +351,7 @@ static void i2c_teardown(FAR struct i2ctool_s *i2ctool)
* Name: i2c_main
****************************************************************************/
#ifdef CONFIG_I2CTOOL_BUILTIN
# define MAIN_NAME i2c_main
# define MAIN_NAME_STRING "i2c_main"
#else
# define MAIN_NAME user_start
# define MAIN_NAME_STRING "user_start"
#endif
int MAIN_NAME(int argc, char *argv[])
int i2c_main(int argc, char *argv[])
{
/* Verify settings */
+48 -1
View File
@@ -3202,4 +3202,51 @@
for control transfers but does not resolve all of the issues.
* configs/stm3220g-eval/*/defconfig: Calibrated delay loop. It had
never been calibrated was was way off.
* sched/sem_holder.c: Add logic to handler some priority inheritance
cases when sem_post() is called from an interrupt handler. The
logic is clearly wrong, but it is not known if this is the
cause of any known bugs.
* lib/stdio/lib_perror(): Add perror(). Contributed by Kate.
* lib/string/lib_strerror(): Add option CONFIG_LIBC_STRERROR that
is now required to enabled strerror(). Add an option
CONFIG_LIBC_STRERROR_SHORT that can be used to output shortened
strings by strerror().
* arch/arm/src/stm32/stm32_usbotghost.c: Finally... the USB OTG FS
appears to handle NAKing correctly is complete.
* configs/stm32f4discovery/*: Added and verifed support for USB OTG FS
host on the STM32F4Discovery board.
* configs/*/defconfig: Remove configuration documentation from config
files. It is redundant, error-prone, and difficult to maintain.
Configuration documentation is available in configs/README.txt for
common configurations and in configs/*/README.txt for board and MCU_
specific configurations.
* configs/stm3240g-eval: Add USB host support.
* sched/os_bring.c, configs/*/defconfig, tools/mkconfig.c, and others: Added
configuration variable CONFIG_USER_ENTRYPOINT that may be used to change
the default entry from user_start to some other symbol. Contributed by
Kate. NOTE: This change does introduce a minor backward incompatibility.
For example, if your application uses NSH as its start-up program, then your
code will not fail because it will be unable to find "user_start". The fix
for this link failure is to add the following to your configuration file:
CONFIG_USER_ENTRYPOINT="nsh_main".
* libs/stdio/lib_libfread.c and lib_*flush*.c: Correct a couple of
error cases where the lib semaphore was not be released on error
exits (thanks Ronen Vainish). Also, improved some error reporting:
the generic ERROR was being used instead of the specific errno
value; the errno variable was not always set correctly.
* tools/mkfsdata.pl: The uIP web server CGI image making perl script was
moved from apps/netutils/webserver/makefsdata to nuttx/tools/mkfsdata.pl
(Part of a larger change submitted by Max Holtzberg).
* configs/stm3240g-eval/script/ld.script: All of the identical ld.script
files for the STM3240G-EVAL were replaced by one version in this directory.
* configs/stm3240g-eval/webserver: Configuration submitted by Max Holtzberg
for testing the changes to the uIP web server (see apps/ChangeLog.txt).
* lib/stdio/lib_perror.c: Remove CONFIG_LIBC_PERROR_DEVNAME. What was I
thinking? Arbitrary streams cannot be shared by different tasks.
* tools/mksyscall.c, csvparser.c, and csvparser.h: Separate CSV parsing
logic from mksyscall.c into files where it can be shared.
* tools/mksymtab.c: Add a tool that can be used to convert a CSV file
into a NuttX-style symbol table.
* sched/work_cancel.c: Fix a bad assertion (reported by Mike Smith)
* configs/stm3210e-eval/src/up_idle.c: Correct some power management
compilation errors (reported by Diego Sanchez).
File diff suppressed because it is too large Load Diff
+52 -5
View File
@@ -7,6 +7,7 @@ Table of Contents
o Summary of Files
o Supported Architectures
o Configuring NuttX
o Building Symbol Tables
Board-Specific Configurations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -268,6 +269,7 @@ defconfig -- This is a configuration file similar to the Linux
by default)
CONFIG_DEBUG_GRAPHICS - enable NX graphics debug output
(disabled by default)
CONFIG_ARCH_LOWPUTC - architecture supports low-level, boot
time console output
CONFIG_MM_REGIONS - If the architecture includes multiple
@@ -331,7 +333,7 @@ defconfig -- This is a configuration file similar to the Linux
threads (minus 1) than can be waiting for another thread
to release a count on a semaphore. This value may be set
to zero if no more than one thread is expected to wait for
a semaphore. If defined, then this should be a relatively
a semaphore. If defined, then this should be a relatively
small number because this the number of maximumum of waiters
on one semaphore (like 4 or 8).
CONFIG_FDCLONE_DISABLE. Disable cloning of all file descriptors
@@ -375,6 +377,10 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_SCHED_ONEXIT_MAX - By default if CONFIG_SCHED_ONEXIT is selected,
only a single on_exit() function is supported. That number can be
increased by defined this setting to the number that you require.
CONFIG_USER_ENTRYPOINT - The name of the entry point for user
applications. For the example applications this is of the form 'app_main'
where 'app' is the application name. If not defined, CONFIG_USER_ENTRYPOINT
defaults to user_start.
System Logging:
CONFIG_SYSLOG enables general system logging support.
@@ -546,10 +552,28 @@ defconfig -- This is a configuration file similar to the Linux
Misc libc settings
CONFIG_NOPRINTF_FIELDWIDTH - sprintf-related logic is a
little smaller if we do not support fieldwidthes
CONFIG_LIBC_FLOATINGPOINT - By default, floating point
support in printf, sscanf, etc. is disabled.
CONFIG_NOPRINTF_FIELDWIDTH - sprintf-related logic is a little smaller
if we do not support fieldwidthes
CONFIG_LIBC_FLOATINGPOINT - By default, floating point support in printf,
sscanf, etc. is disabled.
CONFIG_LIBC_STRERROR - strerror() is useful because it decodes 'errno'
values into a human readable strings. But it can also require
a lot of memory. If this option is selected, strerror() will still
exist in the build but it will not decode error values. This option
should be used by other logic to decide if it should use strerror() or
not. For example, the NSH application will not use strerror() if this
option is not selected; perror() will not use strerror() is this option
is not selected (see also CONFIG_NSH_STRERROR).
CONFIG_LIBC_STRERROR_SHORT - If this option is selected, then strerror()
will use a shortened string when it decodes the error. Specifically,
strerror() is simply use the string that is the common name for the
error. For example, the 'errno' value of 2 will produce the string
"No such file or directory" if CONFIG_LIBC_STRERROR_SHORT is not
defined but the string "ENOENT" if CONFIG_LIBC_STRERROR_SHORT is
defined.
CONFIG_LIBC_PERROR_STDOUT - POSIX requires that perror() provide its output
on stderr. This option may be defined, however, to provide perror() output
that is serialized with other stdout messages.
Allow for architecture optimized implementations
@@ -1782,3 +1806,26 @@ command line like:
cd tools
./configure.sh -a <app-dir> <board-name>/<config-dir>
Building Symbol Tables
^^^^^^^^^^^^^^^^^^^^^^
Symbol tables are needed at several of the binfmt interfaces in order to bind
a module to the base code. These symbol tables can be tricky to create and
will probably have to be tailored for any specific application, balancing
the number of symbols and the size of the symbol table against the symbols
required by the applications.
The top-level System.map file is one good source of symbol information
(which, or course, was just generated from the top-level nuttx file
using the GNU 'nm' tool).
There are also common-separated value (CSV) values in the source try that
provide information about symbols. In particular:
nuttx/syscall/syscall.csv - Describes the NuttX RTOS interface, and
nuttx/lib/lib.csv - Describes the NuttX C library interface.
There is a tool at nuttx/tools/mksymtab that will use these CSV files as
input to generate a generic symbol table. See nuttx/tools/README.txt for
more information about using the mksymtab tool.
+1
View File
@@ -510,6 +510,7 @@ CONFIG_HAVE_LIBM=y
# CONFIG_SCHED_WAITPID - Enable the waitpid() API
# CONFIG_SCHED_ATEXIT - Enabled the atexit() API
#
CONFIG_USER_ENTRYPOINT="nsh_main"
#CONFIG_APPS_DIR=
CONFIG_DEBUG=y
CONFIG_DEBUG_VERBOSE=y
+1
View File
@@ -323,6 +323,7 @@ CONFIG_HAVE_LIBM=n
# CONFIG_SCHED_WAITPID - Enable the waitpid() API
# CONFIG_SCHED_ATEXIT - Enabled the atexit() API
#
CONFIG_USER_ENTRYPOINT="user_start"
#CONFIG_APPS_DIR=
CONFIG_DEBUG=n
CONFIG_DEBUG_VERBOSE=n
+8 -7
View File
@@ -42,6 +42,7 @@
#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <assert.h>
#include <debug.h>
@@ -317,7 +318,7 @@ int usbhost_enumerate(FAR struct usbhost_driver_s *drvr, uint8_t funcaddr,
DEBUGASSERT(drvr && class);
/* Allocate TD buffers for use in this function. We will need two:
/* Allocate descriptor buffers for use in this function. We will need two:
* One for the request and one for the data buffer.
*/
@@ -400,7 +401,7 @@ int usbhost_enumerate(FAR struct usbhost_driver_s *drvr, uint8_t funcaddr,
udbg("ERROR: SETADDRESS DRVR_CTRLOUT returned %d\n", ret);
goto errout;
}
up_mdelay(2);
usleep(2*1000);
/* Modify control pipe with the provided USB device address */
@@ -461,9 +462,9 @@ int usbhost_enumerate(FAR struct usbhost_driver_s *drvr, uint8_t funcaddr,
goto errout;
}
/* Free the TD that we were using for the request buffer. It is not needed
* further here but it may be needed by the class driver during its connection
* operations.
/* Free the descriptor buffer that we were using for the request buffer.
* It is not needed further here but it may be needed by the class driver
* during its connection operations.
*/
DRVR_FREE(drvr, (uint8_t*)ctrlreq);
@@ -488,9 +489,9 @@ int usbhost_enumerate(FAR struct usbhost_driver_s *drvr, uint8_t funcaddr,
}
}
/* Some devices may require this delay before initialization */
/* Some devices may require some delay before initialization */
up_mdelay(100);
usleep(100*1000);
/* Parse the configuration descriptor and bind to the class instance for the
* device. This needs to be the last thing done because the class driver
+8 -4
View File
@@ -42,6 +42,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <semaphore.h>
#include <assert.h>
#include <errno.h>
@@ -724,6 +725,7 @@ static inline int usbhost_testunitready(FAR struct usbhost_state_s *priv)
usbhost_dumpcsw((FAR struct usbmsc_csw_s *)priv->tbuffer);
}
}
return result;
}
@@ -1195,13 +1197,15 @@ static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv)
uvdbg("Get max LUN\n");
ret = usbhost_maxlunreq(priv);
/* Wait for the unit to be ready */
for (retries = 0; retries < USBHOST_MAX_RETRIES && ret == OK; retries++)
for (retries = 0; retries < USBHOST_MAX_RETRIES /* && ret == OK */; retries++)
{
uvdbg("Test unit ready, retries=%d\n", retries);
/* Send TESTUNITREADY to see the unit is ready */
/* Wait just a bit */
usleep(50*1000);
/* Send TESTUNITREADY to see if the unit is ready */
ret = usbhost_testunitready(priv);
if (ret == OK)
+4
View File
@@ -91,6 +91,10 @@
#endif
#ifndef assert
#define assert ASSERT
#endif
/****************************************************************************
* Included Files
****************************************************************************/
+2 -2
View File
@@ -55,8 +55,8 @@ extern "C" {
#define EXTERN extern
#endif
EXTERN char *basename(char *path);
EXTERN char *dirname(char *path);
EXTERN FAR char *basename(FAR char *path);
EXTERN FAR char *dirname(FAR char *path);
#undef EXTERN
#ifdef __cplusplus
+1 -1
View File
@@ -63,7 +63,7 @@ extern "C" {
#define EXTERN extern
#endif
EXTERN char *ether_ntoa(const struct ether_addr *addr);
EXTERN FAR char *ether_ntoa(FAR const struct ether_addr *addr);
EXTERN struct ether_addr *ether_aton(const char *asc);
EXTERN int ether_ntohost(char *hostname, const struct ether_addr *addr);
EXTERN int ether_hostton(const char *hostname, struct ether_addr *addr);
+1 -1
View File
@@ -68,7 +68,7 @@ extern "C" {
/* This entry point must be supplied by the application */
EXTERN int user_start(int argc, char *argv[]);
EXTERN int CONFIG_USER_ENTRYPOINT(int argc, char *argv[]);
/* Functions contained in os_task.c *****************************************/
+1
View File
@@ -128,6 +128,7 @@ EXTERN int sprintf(FAR char *buf, const char *format, ...);
EXTERN int asprintf (FAR char **ptr, const char *fmt, ...);
EXTERN int snprintf(FAR char *buf, size_t size, const char *format, ...);
EXTERN int sscanf(const char *buf, const char *fmt, ...);
EXTERN void perror(FAR const char *s);
EXTERN int ungetc(int c, FAR FILE *stream);
EXTERN int vprintf(FAR const char *format, va_list ap);
+42 -2
View File
@@ -23,7 +23,7 @@ config NUNGET_CHARS
---help---
Number of characters that can be buffered by ungetc() (Only if NFILE_STREAMS > 0)
config CONFIG_LIB_HOMEDIR
config LIB_HOMEDIR
string "Home directory"
default "/"
depends on !DISABLE_ENVIRON
@@ -51,6 +51,46 @@ config LIBC_FLOATINGPOINT
By default, floating point
support in printf, sscanf, etc. is disabled.
config LIBC_STRERROR
bool "Enable strerror"
default n
---help---
strerror() is useful because it decodes 'errno' values into a human readable
strings. But it can also require a lot of memory. If this option is selected,
strerror() will still exist in the build but it will not decode error values.
This option should be used by other logic to decide if it should use strerror()
or not. For example, the NSH application will not use strerror() if this
option is not selected; perror() will not use strerror() is this option is not
selected (see also NSH_STRERROR).
config LIBC_STRERROR_SHORT
bool "Use short error descriptions in strerror()"
default n
depends on LIBC_STRERROR
---help---
If this option is selected, then strerror() will use a shortened string when
it decodes the error. Specifically, strerror() is simply use the string that
is the common name for the error. For example, the 'errno' value of 2 will
produce the string "No such file or directory" is LIBC_STRERROR_SHORT
is not defined but the string "ENOENT" is LIBC_STRERROR_SHORT is defined.
config LIBC_PERROR_STDOUT
bool "perror() to stdout"
default n
---help---
POSIX requires that perror() provide its output on stderr. This option may
be defined, however, to provide perror() output that is serialized with
other stdout messages.
config LIBC_PERROR_DEVNAME
string "perror() to device"
default "/dev/console"
depends on !LIBC_PERROR_STDOUT
---help---
Another non-standard option is to provide perror() output to a logging device
or file. LIBC_PERROR_DEVNAME may be defined to be any write-able,
character device (or file).
config ARCH_LOWPUTC
bool "Low-level console output"
default "y"
@@ -68,7 +108,7 @@ config ENABLE_ARCH_OPTIMIZED_FUN
The architecture may provide custom versions of certain
standard header files:
config ARCH_MATH_H, CONFIG_ARCH_STDBOOL_H, CONFIG_ARCH_STDINT_H
config ARCH_MATH_H, ARCH_STDBOOL_H, ARCH_STDINT_H
if ENABLE_ARCH_OPTIMIZED_FUN
config ARCH_MEMCPY
+37
View File
@@ -45,3 +45,40 @@ directory:
misc - Nonstandard "glue" logic, debug.h, crc32.h, dirent.h
Library Database
================
Information about functions available in the NuttX C library information is
maintained in a database. That "database" is implemented as a simple comma-
separated-value file, lib.csv. Most spreadsheets programs will accept this
format and can be used to maintain the library database.
This library database will (eventually) be used to generate symbol library
symbol table information that can be exported to external applications.
The format of the CSV file for each line is:
Field 1: Function name
Field 2: The header file that contains the function prototype
Field 3: Condition for compilation
Field 4: The type of function return value.
Field 5 - N+5: The type of each of the N formal parameters of the function
Each type field has a format as follows:
type name:
For all simpler types
formal type | actual type:
For array types where the form of the formal (eg. int parm[2])
differs from the type of actual passed parameter (eg. int*). This
is necessary because you cannot do simple casts to array types.
formal type | union member actual type | union member fieldname:
A similar situation exists for unions. For example, the formal
parameter type union sigval -- You cannot cast a uintptr_t to
a union sigval, but you can cast to the type of one of the union
member types when passing the actual paramter. Similarly, we
cannot cast a union sigval to a uinptr_t either. Rather, we need
to cast a specific union member fieldname to uintptr_t.
NOTE: The tool mksymtab can be used to generate a symbol table from this CSV
file. See nuttx/tools/README.txt for further details about the use of mksymtab.
+170
View File
@@ -0,0 +1,170 @@
"_inet_ntoa","arpa/inet.h","!defined(CONFIG_NET_IPv6) && !defined(CONFIG_CAN_PASS_STRUCTS)","FAR char","in_addr_t"
"abort","stdlib.h","","void"
"abs","stdlib.h","","int","int"
"asprintf","stdio.h","","int","FAR char **","const char *","..."
"avsprintf","stdio.h","","int","FAR char **","const char *","va_list"
"b16atan2","fixedmath.h","","b16_t","b16_t","b16_t"
"b16cos","fixedmath.h","","b16_t","b16_t"
"b16divb16","fixedmath.h","","b16_t","b16_t","b16_t"
"b16mulb16","fixedmath.h","","b16_t","b16_t","b16_t"
"b16sin","fixedmath.h","","b16_t","b16_t"
"b16sqr","fixedmath.h","","b16_t","b16_t"
"basename","libgen.h","","FAR char","FAR char *"
"cfgetspeed","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","speed_t","FAR const struct termios *"
"cfsetspeed","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","FAR struct termios *","speed_t"
"chdir","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_ENVIRON)","int","FAR const char *"
"crc32","crc32.h","","uint32_t","FAR const uint8_t *","size_t"
"crc32part","crc32.h","","uint32_t","FAR const uint8_t *","size_t","uint32_t"
"dbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG)","int","const char *","..."
"dbg_enable","debug.h","defined(CONFIG_DEBUG_ENABLE)","void","bool"
"dirname","libgen.h","","FAR char","FAR char *"
"dq_addafter","queue.h","","void","FAR dq_entry_t *","FAR dq_entry_t *","FAR dq_queue_t *"
"dq_addbefore","queue.h","","void","FAR dq_entry_t *","FAR dq_entry_t *","FAR dq_queue_t *"
"dq_addfirst","queue.h","","void","FAR dq_entry_t *","dq_queue_t *"
"dq_addlast","queue.h","","void","FAR dq_entry_t *","dq_queue_t *"
"dq_rem","queue.h","","void","FAR dq_entry_t *","dq_queue_t *"
"dq_remfirst","queue.h","","FAR dq_entry_t","dq_queue_t *"
"dq_remlast","queue.h","","FAR dq_entry_t","dq_queue_t *"
"ether_ntoa","netinet/ether.h","","FAR char","FAR const struct ether_addr *"
"fclose","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *"
"fdopen","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR FILE","int","FAR const char *"
"fflush","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *"
"fgetc","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *"
"fgetpos","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR fpos_t *"
"fgets","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR char","FAR char *","int","FAR FILE *"
"fileno","stdio.h","","int","FAR FILE *"
"fopen","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR FILE","FAR const char *","FAR const char *"
"fprintf","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR const char *","..."
"fputc","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","int c","FAR FILE *"
"fputs","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR const char *","FAR FILE *"
"fread","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","size_t","FAR void *","size_t","size_t","FAR FILE *"
"fseek","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","long int","int"
"fsetpos","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR fpos_t *"
"ftell","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","long","FAR FILE *"
"fwrite","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","size_t","FAR const void *","size_t","size_t","FAR FILE *"
"getcwd","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_ENVIRON)","FAR char","FAR char *","size_t"
"getopt","unistd.h","","int","int","FAR char *const[]","FAR const char *"
"getoptargp","unistd.h","","FAR char *"
"getoptindp","unistd.h","","int"
"getoptoptp","unistd.h","","int"
"gets","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR char","FAR char *"
"gmtime","time.h","","struct tm","const time_t *"
"gmtime_r","time.h","","FAR struct tm","FAR const time_t *","FAR struct tm *"
"htonl","arpa/inet.h","","uint32_t","uint32_t"
"htons","arpa/inet.h","","uint16_t","uint16_t"
"imaxabs","stdlib.h","","intmax_t","intmax_t"
"inet_addr","arpa/inet.h","","in_addr_t","FAR const char "
"inet_ntoa","arpa/inet.h","!defined(CONFIG_NET_IPv6) && defined(CONFIG_CAN_PASS_STRUCTS)","FAR char","struct in_addr"
"inet_ntop","arpa/inet.h","","FAR const char","int","FAR const void *","FAR char *","socklen_t"
"inet_pton","arpa/inet.h","","int","int","FAR const char *","FAR void *"
"labs","stdlib.h","","long int","long int"
"lib_dumpbuffer","debug.h","","void","FAR const char *","FAR const uint8_t *","unsigned int"
"lib_lowprintf","debug.h","","int","FAR const char *","..."
"lib_rawprintf","debug.h","","int","FAR const char *","..."
"llabs","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","long long int","long long int"
"lldbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..."
"llvdbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..."
"match","","","int","const char *","const char *"
"memccpy","string.h","","FAR void","FAR void *","FAR const void *","int c","size_t"
"memchr","string.h","","FAR void","FAR const void *","int c","size_t"
"memcmp","string.h","","int","FAR const void *","FAR const void *","size_t"
"memcpy","string.h","","FAR void","FAR void *","FAR const void *","size_t"
"memmove","string.h","","FAR void","FAR void *","FAR const void *","size_t"
"memset","string.h","","FAR void","FAR void *","int c","size_t"
"mktime","time.h","","time_t","const struct tm *"
"mq_getattr","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","mqd_t","struct mq_attr *"
"mq_setattr","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","mqd_t","const struct mq_attr *","struct mq_attr *"
"ntohl","arpa/inet.h","","uint32_t","uint32_t"
"ntohs","arpa/inet.h","","uint16_t","uint16_t"
"perror","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","void","FAR const char *"
"printf","stdio.h","","int","const char *","..."
"pthread_attr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *"
"pthread_attr_getinheritsched","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR const pthread_attr_t *","FAR int *"
"pthread_attr_getschedparam","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","FAR struct sched_param *"
"pthread_attr_getschedpolicy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","int *"
"pthread_attr_getstacksize","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","FAR long *"
"pthread_attr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *"
"pthread_attr_setinheritsched","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","int"
"pthread_attr_setschedparam","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","FAR const struct sched_param *"
"pthread_attr_setschedpolicy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","int"
"pthread_attr_setstacksize","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","long"
"pthread_barrierattr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrierattr_t *"
"pthread_barrierattr_getpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR const pthread_barrierattr_t *","FAR int *"
"pthread_barrierattr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrierattr_t *"
"pthread_barrierattr_setpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrierattr_t *","int"
"pthread_condattr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_condattr_t *"
"pthread_condattr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_condattr_t *"
"pthread_mutexattr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutexattr_t *"
"pthread_mutexattr_getpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutexattr_t *","FAR int *"
"pthread_mutexattr_gettype","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_MUTEX_TYPES)","int","const pthread_mutexattr_t *","int *"
"pthread_mutexattr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutexattr_t *"
"pthread_mutexattr_setpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutexattr_t *","int "
"pthread_mutexattr_settype","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_MUTEX_TYPES)","int","pthread_mutexattr_t *","int"
"puts","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR const char *"
"qsort","stdlib.h","","void","void *","size_t","size_t","int(*)(const void *","const void *)"
"rand","stdlib.h","","int"
"readdir_r","dirent.h","CONFIG_NFILE_DESCRIPTORS > 0","int","FAR DIR *","FAR struct dirent *","FAR struct dirent **"
"rint","","","double_t","double_t"
"sched_get_priority_max","sched.h","","int","int"
"sched_get_priority_min","sched.h","","int","int"
"sem_getvalue","semaphore.h","","int","FAR sem_t *","FAR int *"
"sem_init","semaphore.h","","int","FAR sem_t *","int","unsigned int"
"sigaddset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *","int"
"sigdelset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *","int"
"sigemptyset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *"
"sigfillset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *"
"sigismember","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR const sigset_t *","int"
"snprintf","stdio.h","","int","FAR char *","size_t","const char *","..."
"sprintf","stdio.h","","int","FAR char *","const char *","..."
"sq_addafter","queue.h","","void","FAR sq_entry_t *","FAR sq_entry_t *","FAR sq_queue_t *"
"sq_addfirst","queue.h","","void","FAR sq_entry_t *","sq_queue_t *"
"sq_addlast","queue.h","","void","FAR sq_entry_t *","sq_queue_t *"
"sq_rem","queue.h","","void","FAR sq_entry_t *","sq_queue_t *"
"sq_remafter","queue.h","","FAR sq_entry_t","FAR sq_entry_t *","sq_queue_t *"
"sq_remfirst","queue.h","","FAR sq_entry_t","sq_queue_t *"
"sq_remlast","queue.h","","FAR sq_entry_t","sq_queue_t *"
"srand","stdlib.h","","void","unsigned int"
"sscanf","stdio.h","","int","const char *","const char *","..."
"strcasecmp","string.h","","int","FAR const char *","FAR const char *"
"strcasestr","string.h","","FAR char","FAR const char *","FAR const char *"
"strcat","string.h","","FAR char","FAR char *","FAR const char *"
"strchr","string.h","","FAR char","FAR const char *","int"
"strcmp","string.h","","int","FAR const char *","FAR const char *"
"strcpy","string.h","","FAR char","char *","FAR const char *"
"strcspn","string.h","","size_t","FAR const char *","FAR const char *"
"strdup","string.h","","FAR char","FAR const char *"
"strerror","string.h","","FAR const char","int"
"strftime","time.h","","size_t","char *","size_t","const char *","const struct tm *"
"strlen","string.h","","size_t","FAR const char *"
"strncasecmp","string.h","","int","FAR const char *","FAR const char *","size_t"
"strncat","string.h","","FAR char","FAR char *","FAR const char *","size_t"
"strncmp","string.h","","int","FAR const char *","FAR const char *","size_t"
"strncpy","string.h","","FAR char","char *","FAR const char *","size_t"
"strndup","string.h","","FAR char","FAR const char *","size_t"
"strnlen","string.h","","size_t","FAR const char *","size_t"
"strpbrk","string.h","","FAR char","FAR const char *","FAR const char *"
"strrchr","string.h","","FAR char","FAR const char *","int"
"strspn","string.h","","size_t","FAR const char *","FAR const char *"
"strstr","string.h","","FAR char","FAR const char *","FAR const char *"
"strtod","stdlib.h","","double_t","const char *str","char **endptr"
"strtok","string.h","","FAR char","FAR char *","FAR const char *"
"strtok_r","string.h","","FAR char","FAR char *","FAR const char *","FAR char **"
"strtol","string.h","","long","const char *","char **","int"
"strtoll","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","long long","const char *nptr","char **endptr","int base"
"strtoul","stdlib.h","","unsigned long","const char *","char **","int"
"strtoull","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","unsigned long long","const char *","char **","int"
"tcflush","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","int"
"tcgetattr","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","FAR struct termios *"
"tcsetattr","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","int","FAR const struct termios *"
"telldir","dirent.h","CONFIG_NFILE_DESCRIPTORS > 0","off_t","FAR DIR *"
"time","time.h","","time_t","time_t *"
"ub16divub16","fixedmath.h","","ub16_t","ub16_t","ub16_t"
"ub16mulub16","fixedmath.h","","ub16_t","ub16_t","ub16_t"
"ub16sqr","fixedmath.h","","ub16_t","ub16_t"
"ungetc","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","int","FAR FILE *"
"vdbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE)","int","const char *","..."
"vfprintf","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","const char *","va_list"
"vprintf","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR const char *","va_list"
"vsnprintf","stdio.h","","int","FAR char *","size_t","const char *","va_list"
"vsprintf","stdio.h","","int","FAR char *","const char *","va_list"
"vsscanf","stdio.h","","int","char *","const char *","va_list"
1 _inet_ntoa arpa/inet.h !defined(CONFIG_NET_IPv6) && !defined(CONFIG_CAN_PASS_STRUCTS) FAR char in_addr_t
2 abort stdlib.h void
3 abs stdlib.h int int
4 asprintf stdio.h int FAR char ** const char * ...
5 avsprintf stdio.h int FAR char ** const char * va_list
6 b16atan2 fixedmath.h b16_t b16_t b16_t
7 b16cos fixedmath.h b16_t b16_t
8 b16divb16 fixedmath.h b16_t b16_t b16_t
9 b16mulb16 fixedmath.h b16_t b16_t b16_t
10 b16sin fixedmath.h b16_t b16_t
11 b16sqr fixedmath.h b16_t b16_t
12 basename libgen.h FAR char FAR char *
13 cfgetspeed termios.h CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS) speed_t FAR const struct termios *
14 cfsetspeed termios.h CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS) int FAR struct termios * speed_t
15 chdir unistd.h CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_ENVIRON) int FAR const char *
16 crc32 crc32.h uint32_t FAR const uint8_t * size_t
17 crc32part crc32.h uint32_t FAR const uint8_t * size_t uint32_t
18 dbg debug.h !defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) int const char * ...
19 dbg_enable debug.h defined(CONFIG_DEBUG_ENABLE) void bool
20 dirname libgen.h FAR char FAR char *
21 dq_addafter queue.h void FAR dq_entry_t * FAR dq_entry_t * FAR dq_queue_t *
22 dq_addbefore queue.h void FAR dq_entry_t * FAR dq_entry_t * FAR dq_queue_t *
23 dq_addfirst queue.h void FAR dq_entry_t * dq_queue_t *
24 dq_addlast queue.h void FAR dq_entry_t * dq_queue_t *
25 dq_rem queue.h void FAR dq_entry_t * dq_queue_t *
26 dq_remfirst queue.h FAR dq_entry_t dq_queue_t *
27 dq_remlast queue.h FAR dq_entry_t dq_queue_t *
28 ether_ntoa netinet/ether.h FAR char FAR const struct ether_addr *
29 fclose stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int FAR FILE *
30 fdopen stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 FAR FILE int FAR const char *
31 fflush stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int FAR FILE *
32 fgetc stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int FAR FILE *
33 fgetpos stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int FAR FILE * FAR fpos_t *
34 fgets stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 FAR char FAR char * int FAR FILE *
35 fileno stdio.h int FAR FILE *
36 fopen stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 FAR FILE FAR const char * FAR const char *
37 fprintf stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int FAR FILE * FAR const char * ...
38 fputc stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int int c FAR FILE *
39 fputs stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int FAR const char * FAR FILE *
40 fread stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 size_t FAR void * size_t size_t FAR FILE *
41 fseek stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int FAR FILE * long int int
42 fsetpos stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int FAR FILE * FAR fpos_t *
43 ftell stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 long FAR FILE *
44 fwrite stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 size_t FAR const void * size_t size_t FAR FILE *
45 getcwd unistd.h CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_ENVIRON) FAR char FAR char * size_t
46 getopt unistd.h int int FAR char *const[] FAR const char *
47 getoptargp unistd.h FAR char *
48 getoptindp unistd.h int
49 getoptoptp unistd.h int
50 gets stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 FAR char FAR char *
51 gmtime time.h struct tm const time_t *
52 gmtime_r time.h FAR struct tm FAR const time_t * FAR struct tm *
53 htonl arpa/inet.h uint32_t uint32_t
54 htons arpa/inet.h uint16_t uint16_t
55 imaxabs stdlib.h intmax_t intmax_t
56 inet_addr arpa/inet.h in_addr_t FAR const char
57 inet_ntoa arpa/inet.h !defined(CONFIG_NET_IPv6) && defined(CONFIG_CAN_PASS_STRUCTS) FAR char struct in_addr
58 inet_ntop arpa/inet.h FAR const char int FAR const void * FAR char * socklen_t
59 inet_pton arpa/inet.h int int FAR const char * FAR void *
60 labs stdlib.h long int long int
61 lib_dumpbuffer debug.h void FAR const char * FAR const uint8_t * unsigned int
62 lib_lowprintf debug.h int FAR const char * ...
63 lib_rawprintf debug.h int FAR const char * ...
64 llabs stdlib.h defined(CONFIG_HAVE_LONG_LONG) long long int long long int
65 lldbg debug.h !defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_ARCH_LOWPUTC) int const char * ...
66 llvdbg debug.h !defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_ARCH_LOWPUTC) int const char * ...
67 match int const char * const char *
68 memccpy string.h FAR void FAR void * FAR const void * int c size_t
69 memchr string.h FAR void FAR const void * int c size_t
70 memcmp string.h int FAR const void * FAR const void * size_t
71 memcpy string.h FAR void FAR void * FAR const void * size_t
72 memmove string.h FAR void FAR void * FAR const void * size_t
73 memset string.h FAR void FAR void * int c size_t
74 mktime time.h time_t const struct tm *
75 mq_getattr mqueue.h !defined(CONFIG_DISABLE_MQUEUE) int mqd_t struct mq_attr *
76 mq_setattr mqueue.h !defined(CONFIG_DISABLE_MQUEUE) int mqd_t const struct mq_attr * struct mq_attr *
77 ntohl arpa/inet.h uint32_t uint32_t
78 ntohs arpa/inet.h uint16_t uint16_t
79 perror stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 void FAR const char *
80 printf stdio.h int const char * ...
81 pthread_attr_destroy pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_attr_t *
82 pthread_attr_getinheritsched pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR const pthread_attr_t * FAR int *
83 pthread_attr_getschedparam pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_attr_t * FAR struct sched_param *
84 pthread_attr_getschedpolicy pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_attr_t * int *
85 pthread_attr_getstacksize pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_attr_t * FAR long *
86 pthread_attr_init pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_attr_t *
87 pthread_attr_setinheritsched pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_attr_t * int
88 pthread_attr_setschedparam pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_attr_t * FAR const struct sched_param *
89 pthread_attr_setschedpolicy pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_attr_t * int
90 pthread_attr_setstacksize pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_attr_t * long
91 pthread_barrierattr_destroy pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_barrierattr_t *
92 pthread_barrierattr_getpshared pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR const pthread_barrierattr_t * FAR int *
93 pthread_barrierattr_init pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_barrierattr_t *
94 pthread_barrierattr_setpshared pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_barrierattr_t * int
95 pthread_condattr_destroy pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_condattr_t *
96 pthread_condattr_init pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_condattr_t *
97 pthread_mutexattr_destroy pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_mutexattr_t *
98 pthread_mutexattr_getpshared pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_mutexattr_t * FAR int *
99 pthread_mutexattr_gettype pthread.h !defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_MUTEX_TYPES) int const pthread_mutexattr_t * int *
100 pthread_mutexattr_init pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_mutexattr_t *
101 pthread_mutexattr_setpshared pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_mutexattr_t * int
102 pthread_mutexattr_settype pthread.h !defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_MUTEX_TYPES) int pthread_mutexattr_t * int
103 puts stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int FAR const char *
104 qsort stdlib.h void void * size_t size_t int(*)(const void * const void *)
105 rand stdlib.h int
106 readdir_r dirent.h CONFIG_NFILE_DESCRIPTORS > 0 int FAR DIR * FAR struct dirent * FAR struct dirent **
107 rint double_t double_t
108 sched_get_priority_max sched.h int int
109 sched_get_priority_min sched.h int int
110 sem_getvalue semaphore.h int FAR sem_t * FAR int *
111 sem_init semaphore.h int FAR sem_t * int unsigned int
112 sigaddset signal.h !defined(CONFIG_DISABLE_SIGNALS) int FAR sigset_t * int
113 sigdelset signal.h !defined(CONFIG_DISABLE_SIGNALS) int FAR sigset_t * int
114 sigemptyset signal.h !defined(CONFIG_DISABLE_SIGNALS) int FAR sigset_t *
115 sigfillset signal.h !defined(CONFIG_DISABLE_SIGNALS) int FAR sigset_t *
116 sigismember signal.h !defined(CONFIG_DISABLE_SIGNALS) int FAR const sigset_t * int
117 snprintf stdio.h int FAR char * size_t const char * ...
118 sprintf stdio.h int FAR char * const char * ...
119 sq_addafter queue.h void FAR sq_entry_t * FAR sq_entry_t * FAR sq_queue_t *
120 sq_addfirst queue.h void FAR sq_entry_t * sq_queue_t *
121 sq_addlast queue.h void FAR sq_entry_t * sq_queue_t *
122 sq_rem queue.h void FAR sq_entry_t * sq_queue_t *
123 sq_remafter queue.h FAR sq_entry_t FAR sq_entry_t * sq_queue_t *
124 sq_remfirst queue.h FAR sq_entry_t sq_queue_t *
125 sq_remlast queue.h FAR sq_entry_t sq_queue_t *
126 srand stdlib.h void unsigned int
127 sscanf stdio.h int const char * const char * ...
128 strcasecmp string.h int FAR const char * FAR const char *
129 strcasestr string.h FAR char FAR const char * FAR const char *
130 strcat string.h FAR char FAR char * FAR const char *
131 strchr string.h FAR char FAR const char * int
132 strcmp string.h int FAR const char * FAR const char *
133 strcpy string.h FAR char char * FAR const char *
134 strcspn string.h size_t FAR const char * FAR const char *
135 strdup string.h FAR char FAR const char *
136 strerror string.h FAR const char int
137 strftime time.h size_t char * size_t const char * const struct tm *
138 strlen string.h size_t FAR const char *
139 strncasecmp string.h int FAR const char * FAR const char * size_t
140 strncat string.h FAR char FAR char * FAR const char * size_t
141 strncmp string.h int FAR const char * FAR const char * size_t
142 strncpy string.h FAR char char * FAR const char * size_t
143 strndup string.h FAR char FAR const char * size_t
144 strnlen string.h size_t FAR const char * size_t
145 strpbrk string.h FAR char FAR const char * FAR const char *
146 strrchr string.h FAR char FAR const char * int
147 strspn string.h size_t FAR const char * FAR const char *
148 strstr string.h FAR char FAR const char * FAR const char *
149 strtod stdlib.h double_t const char *str char **endptr
150 strtok string.h FAR char FAR char * FAR const char *
151 strtok_r string.h FAR char FAR char * FAR const char * FAR char **
152 strtol string.h long const char * char ** int
153 strtoll stdlib.h defined(CONFIG_HAVE_LONG_LONG) long long const char *nptr char **endptr int base
154 strtoul stdlib.h unsigned long const char * char ** int
155 strtoull stdlib.h defined(CONFIG_HAVE_LONG_LONG) unsigned long long const char * char ** int
156 tcflush termios.h CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS) int int int
157 tcgetattr termios.h CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS) int int FAR struct termios *
158 tcsetattr termios.h CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS) int int int FAR const struct termios *
159 telldir dirent.h CONFIG_NFILE_DESCRIPTORS > 0 off_t FAR DIR *
160 time time.h time_t time_t *
161 ub16divub16 fixedmath.h ub16_t ub16_t ub16_t
162 ub16mulub16 fixedmath.h ub16_t ub16_t ub16_t
163 ub16sqr fixedmath.h ub16_t ub16_t
164 ungetc stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int int FAR FILE *
165 vdbg debug.h !defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) int const char * ...
166 vfprintf stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int FAR FILE * const char * va_list
167 vprintf stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 int FAR const char * va_list
168 vsnprintf stdio.h int FAR char * size_t const char * va_list
169 vsprintf stdio.h int FAR char * const char * va_list
170 vsscanf stdio.h int char * const char * va_list
+3 -3
View File
@@ -1,8 +1,8 @@
/****************************************************************************
* lib/libgen/lib_basename.c
*
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Copyright (C) 2007, 2009, 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -78,7 +78,7 @@ static char g_retchar[2];
*
****************************************************************************/
char *basename(char *path)
FAR char *basename(FAR char *path)
{
char *p;
int len;
+3 -3
View File
@@ -1,8 +1,8 @@
/****************************************************************************
* lib/libgen/lib_dirname.c
*
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Copyright (C) 2007, 2009, 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -78,7 +78,7 @@ static char g_retchar[2];
*
****************************************************************************/
char *dirname(char *path)
FAR char *dirname(FAR char *path)
{
char *p;
int len;
+1 -1
View File
@@ -2,7 +2,7 @@
* lib/math/lib_b16atan2.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* lib/math/lib_b16cos.c
*
* Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* lib/math/lib_b16sin.c
*
* Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions

Some files were not shown because too many files have changed in this diff Show More