Lines Matching refs:printf
21 printf("Usage:\n"); in print_usage()
22 printf("\n"); in print_usage()
23 printf("%s DEVICE COMMAND [command arguments]\n", prog_name); in print_usage()
24 printf("DEVICE is either the i2c bus or i2c slave COMMAND applies to.\n"); in print_usage()
25 printf("COMMAND is one of the following commands, optionally followed \n"); in print_usage()
26 printf("arguments which are specific to each command.\n"); in print_usage()
27 printf("\n"); in print_usage()
28 printf("read LENGTH: Read data from the target slave device.\n"); in print_usage()
29 printf("LENGTH is the number of bytes to read in decimal.\n"); in print_usage()
30 printf("\n"); in print_usage()
31 printf("write [data]: Write data to the target slave device.\n"); in print_usage()
32 printf("data is a sequence of hex values which each represent one byte\n"); in print_usage()
33 printf("of data to write to the target device.\n"); in print_usage()
34 printf("\n"); in print_usage()
35 printf("transfer [segments]: Perform a transfer to/from the i2c slave.\n"); in print_usage()
36 printf("segments is a series of segment descriptions which are a\n"); in print_usage()
37 printf("direction, a length, and then (for writes) a series of bytes\n"); in print_usage()
38 printf("in hexadecimal.\n"); in print_usage()
39 printf("\n"); in print_usage()
40 printf("The direction is specified as either \"w\" for writes, or\n"); in print_usage()
41 printf("\"r\" for reads.\n"); in print_usage()
42 printf("\n"); in print_usage()
43 printf("For example, to perform a write of one byte and then a read\n"); in print_usage()
44 printf("of one byte without giving up the bus:\n"); in print_usage()
45 printf("%s [dev] transfer w 1 00 r 1\n", prog_name); in print_usage()
63 printf("Failed to allocate buffer.\n"); in cmd_read()
69 printf("Error reading from slave. (%d)\n", ret); in cmd_read()
74 printf(" %02x", buf[i]); in cmd_read()
75 if (i % 32 == 31) printf("\n"); in cmd_read()
77 printf("\n"); in cmd_read()
92 printf("Failed to allocate buffer.\n"); in cmd_write()
110 printf("Error writing to slave. (%d)\n", ret); in cmd_write()
232 printf("Error in transfer to/from slave. (%d)\n", res); in cmd_transfer()
237 printf(" %02x", ((uint8_t*)out_buf)[i]); in cmd_transfer()
238 if (i % 32 == 31) printf("\n"); in cmd_transfer()
240 printf("\n"); in cmd_transfer()
270 printf("Error opening I2C device.\n"); in main()
281 printf("Unrecognized command %s.\n", cmd); in main()
286 printf("We should never get here!.\n"); in main()