Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Side by Side Diff: platform/omap3/i2c.c

Issue 1348403002: Consistently use the STATIC_COMMAND macro every time we define a console command. (Closed) Base URL: https://github.com/travisg/lk.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/version/version.c ('k') | platform/power.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008 Travis Geiselbrecht 2 * Copyright (c) 2008 Travis Geiselbrecht
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining 4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files 5 * a copy of this software and associated documentation files
6 * (the "Software"), to deal in the Software without restriction, 6 * (the "Software"), to deal in the Software without restriction,
7 * including without limitation the rights to use, copy, modify, merge, 7 * including without limitation the rights to use, copy, modify, merge,
8 * publish, distribute, sublicense, and/or sell copies of the Software, 8 * publish, distribute, sublicense, and/or sell copies of the Software,
9 * and to permit persons to whom the Software is furnished to do so, 9 * and to permit persons to whom the Software is furnished to do so,
10 * subject to the following conditions: 10 * subject to the following conditions:
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 { 271 {
272 } 272 }
273 273
274 #if WITH_LIB_CONSOLE 274 #if WITH_LIB_CONSOLE
275 275
276 #include <lib/console.h> 276 #include <lib/console.h>
277 277
278 static int cmd_i2c(int argc, const cmd_args *argv); 278 static int cmd_i2c(int argc, const cmd_args *argv);
279 279
280 STATIC_COMMAND_START 280 STATIC_COMMAND_START
281 » { "i2c", "i2c read/write commands", &cmd_i2c }, 281 STATIC_COMMAND("i2c", "i2c read/write commands", &cmd_i2c)
282 STATIC_COMMAND_END(i2c); 282 STATIC_COMMAND_END(i2c);
283 283
284 static int cmd_i2c(int argc, const cmd_args *argv) 284 static int cmd_i2c(int argc, const cmd_args *argv)
285 { 285 {
286 int err; 286 int err;
287 287
288 if (argc < 5) { 288 if (argc < 5) {
289 printf("not enough arguments\n"); 289 printf("not enough arguments\n");
290 usage: 290 usage:
291 printf("%s read_reg <bus> <i2c address> <register>\n", argv[0].s tr); 291 printf("%s read_reg <bus> <i2c address> <register>\n", argv[0].s tr);
(...skipping 19 matching lines...) Expand all
311 printf("unrecognized subcommand\n"); 311 printf("unrecognized subcommand\n");
312 goto usage; 312 goto usage;
313 } 313 }
314 314
315 return 0; 315 return 0;
316 } 316 }
317 317
318 #endif // WITH_APP_CONSOLE 318 #endif // WITH_APP_CONSOLE
319 319
320 320
OLDNEW
« no previous file with comments | « lib/version/version.c ('k') | platform/power.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698