• Home
  • Raw
  • Download

Lines Matching refs:toys

79   if (toys.optflags & FLAG_y) return;  in confirm()
181 if (toys.optflags & FLAG_l) { in i2cdetect_main()
182 if (toys.optc) error_exit("-l doesn't take arguments"); in i2cdetect_main()
184 } else if (toys.optflags & FLAG_F) { in i2cdetect_main()
185 if (toys.optc != 1) error_exit("-F BUS"); in i2cdetect_main()
186 i2cdetect_dash_F(atolx_range(*toys.optargs, 0, INT_MAX)); in i2cdetect_main()
190 if (toys.optflags & FLAG_a) { in i2cdetect_main()
195 if (toys.optc != 1 && toys.optc != 3) error_exit("bad args"); in i2cdetect_main()
196 bus = atolx_range(*toys.optargs, 0, INT_MAX); in i2cdetect_main()
197 if (toys.optc == 3) { in i2cdetect_main()
198 first = atolx_range(toys.optargs[1], 0, 0x7f); in i2cdetect_main()
199 last = atolx_range(toys.optargs[1], 0, 0x7f); in i2cdetect_main()
235 int bus = atolx_range(toys.optargs[0], 0, INT_MAX); in i2cdump_main()
236 int chip = atolx_range(toys.optargs[1], 0, 0x7f); in i2cdump_main()
241 fd = i2c_open(bus, (toys.optflags&FLAG_f)?I2C_SLAVE_FORCE:I2C_SLAVE, chip); in i2cdump_main()
261 int bus = atolx_range(toys.optargs[0], 0, INT_MAX); in i2cget_main()
262 int chip = atolx_range(toys.optargs[1], 0, 0x7f); in i2cget_main()
263 int addr = atolx_range(toys.optargs[2], 0, 0xff); in i2cget_main()
268 fd = i2c_open(bus, (toys.optflags&FLAG_f)?I2C_SLAVE_FORCE:I2C_SLAVE, chip); in i2cget_main()
280 int bus = atolx_range(toys.optargs[0], 0, INT_MAX); in i2cset_main()
281 int chip = atolx_range(toys.optargs[1], 0, 0x7f); in i2cset_main()
282 int addr = atolx_range(toys.optargs[2], 0, 0xff); in i2cset_main()
283 char *mode = toys.optargs[toys.optc-1]; in i2cset_main()
290 if (*mode == 'b' && toys.optc == 5) { in i2cset_main()
292 data.byte = atolx_range(toys.optargs[3], 0, 0xff); in i2cset_main()
293 } else if (*mode == 'w' && toys.optc == 5) { in i2cset_main()
295 data.word = atolx_range(toys.optargs[3], 0, 0xffff); in i2cset_main()
296 } else if (*mode == 'i' && toys.optc >= 5) { in i2cset_main()
297 if (toys.optc - 4 > I2C_SMBUS_BLOCK_MAX) error_exit("too much data"); in i2cset_main()
299 for (i = 0; i < toys.optc - 4; ++i) in i2cset_main()
300 data.block[i+1] = atolx_range(toys.optargs[3+i], 0, 0xff); in i2cset_main()
301 data.block[0] = toys.optc - 4; in i2cset_main()
308 fd = i2c_open(bus, (toys.optflags&FLAG_f)?I2C_SLAVE_FORCE:I2C_SLAVE, chip); in i2cset_main()