Skip to content

Commit f9baa42

Browse files
pkarashchenkoxiaoxiang781216
authored andcommitted
style: unify path to files in comment section
Signed-off-by: Petro Karashchenko <[email protected]>
1 parent 3984796 commit f9baa42

File tree

56 files changed

+94
-109
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+94
-109
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ CONFIG_EXAMPLES_HELLO=y
107107

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

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

114114
```makefile

examples/ajoystick/ajoy_main.c

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/****************************************************************************
2-
* examplex/ajoystick/ajoy_main.c
2+
* apps/examples/ajoystick/ajoy_main.c
33
*
44
* Licensed to the Apache Software Foundation (ASF) under one or more
55
* contributor license agreements. See the NOTICE file distributed with
@@ -37,6 +37,7 @@
3737
/****************************************************************************
3838
* Pre-processor Definitions
3939
****************************************************************************/
40+
4041
/* Configuration ************************************************************/
4142

4243
#ifndef CONFIG_AJOYSTICK
@@ -56,10 +57,10 @@
5657
/* Helpers ******************************************************************/
5758

5859
#ifndef MIN
59-
# define MIN(a,b) (a < b ? a : b)
60+
# define MIN(a,b) ((a) < (b) ? (a) : (b))
6061
#endif
6162
#ifndef MAX
62-
# define MAX(a,b) (a > b ? a : b)
63+
# define MAX(a,b) ((a) > (b) ? (a) : (b))
6364
#endif
6465

6566
/****************************************************************************
@@ -75,6 +76,7 @@ static int ajoy_calibrate(int fd);
7576
/****************************************************************************
7677
* Private Data
7778
****************************************************************************/
79+
7880
/* The set of supported joystick buttons */
7981

8082
static ajoy_buttonset_t g_ajoysupported;
@@ -236,8 +238,9 @@ static int ajoy_read(int fd, FAR struct ajoy_sample_s *sample)
236238
return -EIO;
237239
}
238240

239-
/* Show the joystick position and set buttons accompanying the signal */
240-
/* Show the set of joystick buttons that we just read */
241+
/* Show the joystick position and set buttons accompanying the signal.
242+
* Show the set of joystick buttons that we just read
243+
*/
241244

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

421424
timeout.tv_sec = 0;
422-
timeout.tv_nsec = 600*1000*1000;
425+
timeout.tv_nsec = 600 * 1000 * 1000;
423426

424-
for (;;)
427+
for (; ; )
425428
{
426429
struct ajoy_sample_s sample;
427430

examples/bmi160/Make.defs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# sixaxis/Make.defs
2+
# apps/examples/bmi160/Make.defs
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/bmi160/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/bmi160/Makefile
2+
# apps/examples/bmi160/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/cctype/cctype_main.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//***************************************************************************
2-
// examples/cctype/cctype_main.cxx
2+
// apps/examples/cctype/cctype_main.cxx
33
//
44
// Licensed to the Apache Software Foundation (ASF) under one or more
55
// contributor license agreements. See the NOTICE file distributed with

examples/charger/Make.defs

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
############################################################################
2+
# apps/examples/charger/Make.defs
3+
#
4+
# Licensed to the Apache Software Foundation (ASF) under one or more
5+
# contributor license agreements. See the NOTICE file distributed with
6+
# this work for additional information regarding copyright ownership. The
7+
# ASF licenses this file to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance with the
9+
# License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16+
# License for the specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
############################################################################
120

221
ifeq ($(CONFIG_EXAMPLES_CHARGER),y)
322
CONFIGURED_APPS += examples/charger

examples/djoystick/djoy_main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/****************************************************************************
2-
* examplex/djoystick/djoy_main.c
2+
* apps/examples/djoystick/djoy_main.c
33
*
44
* Licensed to the Apache Software Foundation (ASF) under one or more
55
* contributor license agreements. See the NOTICE file distributed with

examples/elf/tests/errno/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/elf/tests/errno/Makefile
2+
# apps/examples/elf/tests/errno/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/elf/tests/hello/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/elf/tests/hello/Makefile
2+
# apps/examples/elf/tests/hello/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/elf/tests/helloxx/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/elf/tests/helloxx/Makefile
2+
# apps/examples/elf/tests/helloxx/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/elf/tests/longjmp/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/elf/tests/longjmp/Makefile
2+
# apps/examples/elf/tests/longjmp/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/elf/tests/mutex/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/elf/tests/mutex/Makefile
2+
# apps/examples/elf/tests/mutex/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/elf/tests/pthread/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/elf/tests/pthread/Makefile
2+
# apps/examples/elf/tests/pthread/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/elf/tests/signal/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/elf/tests/signal/Makefile
2+
# apps/examples/elf/tests/signal/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/elf/tests/struct/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/elf/tests/struct/Makefile
2+
# apps/examples/elf/tests/struct/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/elf/tests/task/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/elf/tests/task/Makefile
2+
# apps/examples/elf/tests/task/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/fboverlay/Make.defs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# apps/graphics/fboverlay/Make.defs
2+
# apps/examples/fboverlay/Make.defs
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/fxos8700cq_test/Kconfig

-21
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,4 @@
1-
#############################################################################
21
#
3-
# examples/fxos8700cq_test/Kconfig
4-
# fxos8700cq motion sensor sample app
5-
#
6-
# Licensed to the Apache Software Foundation (ASF) under one or more
7-
# contributor license agreements. See the NOTICE file distributed with
8-
# this work for additional information regarding copyright ownership. The
9-
# ASF licenses this file to you under the Apache License, Version 2.0 (the
10-
# "License"); you may not use this file except in compliance with the
11-
# License. You may obtain a copy of the License at
12-
#
13-
# http://www.apache.org/licenses/LICENSE-2.0
14-
#
15-
# Unless required by applicable law or agreed to in writing, software
16-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18-
# License for the specific language governing permissions and limitations
19-
# under the License.
20-
#
21-
#############################################################################
22-
232
# For a description of the syntax of this configuration file,
243
# see the file kconfig-language.txt in the NuttX tools repository.
254
#

examples/fxos8700cq_test/Make.defs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#############################################################################
2-
# examples/fxos8700cq_test/Make.defs
2+
# apps/examples/fxos8700cq_test/Make.defs
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/fxos8700cq_test/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#############################################################################
2-
# examples/fxos8700cq/Makefile
2+
# apps/examples/fxos8700cq_test/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/helloxx/helloxx_main.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//***************************************************************************
2-
// examples/helloxx/helloxx_main.cxx
2+
// apps/examples/helloxx/helloxx_main.cxx
33
//
44
// Licensed to the Apache Software Foundation (ASF) under one or more
55
// contributor license agreements. See the NOTICE file distributed with

examples/module/drivers/chardev/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/module/drivers/chardev/Makefile
2+
# apps/examples/module/drivers/chardev/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/mtdrwb/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# apps/examplex/mtdrwb/Makefile
2+
# apps/apps/examples/mtdrwb/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/mtdrwb/mtdrwb_main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/****************************************************************************
2-
* examplex/mtdrwb/mtdrwb_main.c
2+
* apps/examples/mtdrwb/mtdrwb_main.c
33
*
44
* Licensed to the Apache Software Foundation (ASF) under one or more
55
* contributor license agreements. See the NOTICE file distributed with

examples/nettest/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/nettest/Makefile
2+
# apps/examples/nettest/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/null/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/null/Makefile
2+
# apps/examples/null/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/nunchuck/nunchuck_main.c

+15-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/****************************************************************************
2-
* examplex/nunchuck/nunchuck_main.c
2+
* apps/examples/nunchuck/nunchuck_main.c
33
*
44
* Licensed to the Apache Software Foundation (ASF) under one or more
55
* contributor license agreements. See the NOTICE file distributed with
@@ -37,6 +37,7 @@
3737
/****************************************************************************
3838
* Pre-processor Definitions
3939
****************************************************************************/
40+
4041
/* Configuration ************************************************************/
4142

4243
#ifndef CONFIG_INPUT_NUNCHUCK
@@ -52,24 +53,26 @@
5253
/* Helpers ******************************************************************/
5354

5455
#ifndef MIN
55-
# define MIN(a,b) (a < b ? a : b)
56+
# define MIN(a,b) ((a) < (b) ? (a) : (b))
5657
#endif
5758
#ifndef MAX
58-
# define MAX(a,b) (a > b ? a : b)
59+
# define MAX(a,b) ((a) > (b) ? (a) : (b))
5960
#endif
6061

6162
/****************************************************************************
6263
* Private Function Prototypes
6364
****************************************************************************/
6465

65-
static void show_buttons(nunchuck_buttonset_t oldset, nunchuck_buttonset_t newset);
66+
static void show_buttons(nunchuck_buttonset_t oldset,
67+
nunchuck_buttonset_t newset);
6668
static void show_joystick(FAR const struct nunchuck_sample_s *sample);
6769
static int nunchuck_read(int fd, FAR struct nunchuck_sample_s *sample);
6870
static int nunchuck_calibrate(int fd);
6971

7072
/****************************************************************************
7173
* Private Data
7274
****************************************************************************/
75+
7376
/* The set of supported joystick buttons */
7477

7578
static nunchuck_buttonset_t g_nunchucksupported;
@@ -101,7 +104,8 @@ static const char *g_nunchucknames[NUNCHUCK_NBUTTONS] =
101104
* Private Functions
102105
****************************************************************************/
103106

104-
static void show_buttons(nunchuck_buttonset_t oldset, nunchuck_buttonset_t newset)
107+
static void show_buttons(nunchuck_buttonset_t oldset,
108+
nunchuck_buttonset_t newset)
105109
{
106110
nunchuck_buttonset_t chgset = oldset ^ newset;
107111
int i;
@@ -194,8 +198,9 @@ static int nunchuck_read(int fd, FAR struct nunchuck_sample_s *sample)
194198
}
195199

196200
#ifdef CONFIG_DEBUG_INPUT
197-
/* Show the joystick position and set buttons accompanying the signal */
198-
/* Show the set of joystick buttons that we just read */
201+
/* Show the joystick position and set buttons accompanying the signal.
202+
* Show the set of joystick buttons that we just read
203+
*/
199204

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

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

403409
nunchuck_calibrate(fd);
404410

405-
for (;;)
411+
for (; ; )
406412
{
407413
struct nunchuck_sample_s sample;
408414

examples/nxflat/tests/errno/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/nxflat/tests/hello/Makefile
2+
# apps/examples/nxflat/tests/errno/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/nxflat/tests/hello++/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/nxflat/tests/hello/Makefile
2+
# apps/examples/nxflat/tests/hello++/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/nxflat/tests/hello/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/nxflat/tests/hello/Makefile
2+
# apps/examples/nxflat/tests/hello/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/nxflat/tests/longjmp/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/nxflat/tests/longjmp/Makefile
2+
# apps/examples/nxflat/tests/longjmp/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

examples/nxflat/tests/mutex/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# examples/nxflat/tests/mutex/Makefile
2+
# apps/examples/nxflat/tests/mutex/Makefile
33
#
44
# Licensed to the Apache Software Foundation (ASF) under one or more
55
# contributor license agreements. See the NOTICE file distributed with

0 commit comments

Comments
 (0)