Skip to content

Commit

Permalink
style: unify path to files in comment section
Browse files Browse the repository at this point in the history
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
  • Loading branch information
pkarashchenko authored and xiaoxiang781216 committed Mar 9, 2022
1 parent 3984796 commit f9baa42
Show file tree
Hide file tree
Showing 56 changed files with 94 additions and 109 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ CONFIG_EXAMPLES_HELLO=y

This will select the `apps/examples/hello` in the following way:

- The top-level make will include `examples/Make.defs`
- `examples/Make.defs` will set `CONFIGURED_APPS += $(APPDIR)/examples/hello`
- The top-level make will include `apps/examples/Make.defs`
- `apps/examples/Make.defs` will set `CONFIGURED_APPS += $(APPDIR)/examples/hello`
like this:

```makefile
Expand Down
17 changes: 10 additions & 7 deletions examples/ajoystick/ajoy_main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* examplex/ajoystick/ajoy_main.c
* apps/examples/ajoystick/ajoy_main.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
Expand Down Expand Up @@ -37,6 +37,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/

/* Configuration ************************************************************/

#ifndef CONFIG_AJOYSTICK
Expand All @@ -56,10 +57,10 @@
/* Helpers ******************************************************************/

#ifndef MIN
# define MIN(a,b) (a < b ? a : b)
# define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
#ifndef MAX
# define MAX(a,b) (a > b ? a : b)
# define MAX(a,b) ((a) > (b) ? (a) : (b))
#endif

/****************************************************************************
Expand All @@ -75,6 +76,7 @@ static int ajoy_calibrate(int fd);
/****************************************************************************
* Private Data
****************************************************************************/

/* The set of supported joystick buttons */

static ajoy_buttonset_t g_ajoysupported;
Expand Down Expand Up @@ -236,8 +238,9 @@ static int ajoy_read(int fd, FAR struct ajoy_sample_s *sample)
return -EIO;
}

/* Show the joystick position and set buttons accompanying the signal */
/* Show the set of joystick buttons that we just read */
/* Show the joystick position and set buttons accompanying the signal.
* Show the set of joystick buttons that we just read
*/

printf("Read position and button set\n");
show_joystick(sample);
Expand Down Expand Up @@ -419,9 +422,9 @@ int main(int argc, char *argv[])
/* Then loop, receiving signals indicating joystick events. */

timeout.tv_sec = 0;
timeout.tv_nsec = 600*1000*1000;
timeout.tv_nsec = 600 * 1000 * 1000;

for (;;)
for (; ; )
{
struct ajoy_sample_s sample;

Expand Down
2 changes: 1 addition & 1 deletion examples/bmi160/Make.defs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# sixaxis/Make.defs
# apps/examples/bmi160/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/bmi160/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/bmi160/Makefile
# apps/examples/bmi160/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/cctype/cctype_main.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//***************************************************************************
// examples/cctype/cctype_main.cxx
// apps/examples/cctype/cctype_main.cxx
//
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
Expand Down
19 changes: 19 additions & 0 deletions examples/charger/Make.defs
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
############################################################################
# apps/examples/charger/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

ifeq ($(CONFIG_EXAMPLES_CHARGER),y)
CONFIGURED_APPS += examples/charger
Expand Down
2 changes: 1 addition & 1 deletion examples/djoystick/djoy_main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* examplex/djoystick/djoy_main.c
* apps/examples/djoystick/djoy_main.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/elf/tests/errno/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/elf/tests/errno/Makefile
# apps/examples/elf/tests/errno/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/elf/tests/hello/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/elf/tests/hello/Makefile
# apps/examples/elf/tests/hello/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/elf/tests/helloxx/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/elf/tests/helloxx/Makefile
# apps/examples/elf/tests/helloxx/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/elf/tests/longjmp/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/elf/tests/longjmp/Makefile
# apps/examples/elf/tests/longjmp/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/elf/tests/mutex/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/elf/tests/mutex/Makefile
# apps/examples/elf/tests/mutex/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/elf/tests/pthread/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/elf/tests/pthread/Makefile
# apps/examples/elf/tests/pthread/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/elf/tests/signal/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/elf/tests/signal/Makefile
# apps/examples/elf/tests/signal/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/elf/tests/struct/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/elf/tests/struct/Makefile
# apps/examples/elf/tests/struct/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/elf/tests/task/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/elf/tests/task/Makefile
# apps/examples/elf/tests/task/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/fboverlay/Make.defs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/graphics/fboverlay/Make.defs
# apps/examples/fboverlay/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
21 changes: 0 additions & 21 deletions examples/fxos8700cq_test/Kconfig
Original file line number Diff line number Diff line change
@@ -1,25 +1,4 @@
#############################################################################
#
# examples/fxos8700cq_test/Kconfig
# fxos8700cq motion sensor sample app
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
#############################################################################

# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
Expand Down
2 changes: 1 addition & 1 deletion examples/fxos8700cq_test/Make.defs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#############################################################################
# examples/fxos8700cq_test/Make.defs
# apps/examples/fxos8700cq_test/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/fxos8700cq_test/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#############################################################################
# examples/fxos8700cq/Makefile
# apps/examples/fxos8700cq_test/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/helloxx/helloxx_main.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//***************************************************************************
// examples/helloxx/helloxx_main.cxx
// apps/examples/helloxx/helloxx_main.cxx
//
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/module/drivers/chardev/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/module/drivers/chardev/Makefile
# apps/examples/module/drivers/chardev/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/mtdrwb/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/examplex/mtdrwb/Makefile
# apps/apps/examples/mtdrwb/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/mtdrwb/mtdrwb_main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* examplex/mtdrwb/mtdrwb_main.c
* apps/examples/mtdrwb/mtdrwb_main.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/nettest/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/nettest/Makefile
# apps/examples/nettest/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/null/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/null/Makefile
# apps/examples/null/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
24 changes: 15 additions & 9 deletions examples/nunchuck/nunchuck_main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* examplex/nunchuck/nunchuck_main.c
* apps/examples/nunchuck/nunchuck_main.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
Expand Down Expand Up @@ -37,6 +37,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/

/* Configuration ************************************************************/

#ifndef CONFIG_INPUT_NUNCHUCK
Expand All @@ -52,24 +53,26 @@
/* Helpers ******************************************************************/

#ifndef MIN
# define MIN(a,b) (a < b ? a : b)
# define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
#ifndef MAX
# define MAX(a,b) (a > b ? a : b)
# define MAX(a,b) ((a) > (b) ? (a) : (b))
#endif

/****************************************************************************
* Private Function Prototypes
****************************************************************************/

static void show_buttons(nunchuck_buttonset_t oldset, nunchuck_buttonset_t newset);
static void show_buttons(nunchuck_buttonset_t oldset,
nunchuck_buttonset_t newset);
static void show_joystick(FAR const struct nunchuck_sample_s *sample);
static int nunchuck_read(int fd, FAR struct nunchuck_sample_s *sample);
static int nunchuck_calibrate(int fd);

/****************************************************************************
* Private Data
****************************************************************************/

/* The set of supported joystick buttons */

static nunchuck_buttonset_t g_nunchucksupported;
Expand Down Expand Up @@ -101,7 +104,8 @@ static const char *g_nunchucknames[NUNCHUCK_NBUTTONS] =
* Private Functions
****************************************************************************/

static void show_buttons(nunchuck_buttonset_t oldset, nunchuck_buttonset_t newset)
static void show_buttons(nunchuck_buttonset_t oldset,
nunchuck_buttonset_t newset)
{
nunchuck_buttonset_t chgset = oldset ^ newset;
int i;
Expand Down Expand Up @@ -194,8 +198,9 @@ static int nunchuck_read(int fd, FAR struct nunchuck_sample_s *sample)
}

#ifdef CONFIG_DEBUG_INPUT
/* Show the joystick position and set buttons accompanying the signal */
/* Show the set of joystick buttons that we just read */
/* Show the joystick position and set buttons accompanying the signal.
* Show the set of joystick buttons that we just read
*/

printf("Read position and button set\n");
show_joystick(sample);
Expand Down Expand Up @@ -390,7 +395,8 @@ int main(int argc, FAR char *argv[])
ret = ioctl(fd, NUNCHUCKIOC_SUPPORTED, (unsigned long)((uintptr_t)&tmp));
if (ret < 0)
{
fprintf(stderr, "ERROR: ioctl(NUNCHUCKIOC_SUPPORTED) failed: %d\n", errno);
fprintf(stderr, "ERROR: ioctl(NUNCHUCKIOC_SUPPORTED) failed: %d\n",
errno);
goto errout_with_fd;
}

Expand All @@ -402,7 +408,7 @@ int main(int argc, FAR char *argv[])

nunchuck_calibrate(fd);

for (;;)
for (; ; )
{
struct nunchuck_sample_s sample;

Expand Down
2 changes: 1 addition & 1 deletion examples/nxflat/tests/errno/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/nxflat/tests/hello/Makefile
# apps/examples/nxflat/tests/errno/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/nxflat/tests/hello++/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/nxflat/tests/hello/Makefile
# apps/examples/nxflat/tests/hello++/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/nxflat/tests/hello/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/nxflat/tests/hello/Makefile
# apps/examples/nxflat/tests/hello/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/nxflat/tests/longjmp/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/nxflat/tests/longjmp/Makefile
# apps/examples/nxflat/tests/longjmp/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
2 changes: 1 addition & 1 deletion examples/nxflat/tests/mutex/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# examples/nxflat/tests/mutex/Makefile
# apps/examples/nxflat/tests/mutex/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
Loading

0 comments on commit f9baa42

Please sign in to comment.