[flashrom] RFC: magic constants in ft2232_spi.c

Antony Pavlov antonynpavlov at gmail.com
Wed Jan 14 07:06:42 CET 2015


Hi All!

Please see this ft2232_spi.c fragment:

363         msg_pdbg("Set clock divisor\n");
364         buf[0] = 0x86;          /* command "set divisor" */
365         buf[1] = (divisor / 2 - 1) & 0xff;
366         buf[2] = ((divisor / 2 - 1) >> 8) & 0xff;
367         if (send_buf(ftdic, buf, 3)) {
368                 ret = -6;
369                 goto ftdi_err;
370         }

Can we use ftdi.h constant here?
E.g.:

364         buf[0] = TCK_DIVISOR;

-- 
Best regards,
  Antony Pavlov




More information about the flashrom mailing list