Attention is currently required from: Alan Green, Angel Pons, Samir Ibradžić.
View Change
1 comment:
File ft2232_spi.c:
Patch Set #1, Line 98:
* TCK/SK is bit 0.
* TDI/DO is bit 1.
* TDO/DI is bit 2.
* TMS/CS is bit 3.
* GPIOL0 is bit 4.
* GPIOL1 is bit 5.
* GPIOL2 is bit 6.
* GPIOL3 is bit 7.
Shouldn't this be code, e.g. macros or an enum? […]
I don't know, the identifiers wouldn't be used in the code. It's mostly
reading a number from the UI and shifting that into a register value.
Or we could write less condensed code, e.g.
switch (input) {
case 0:
cs_bits |= PIN_GPIOL0;
...
break;
or
const int bits[] = { PIN_GPIOL0, PIN_GPIOL1, PIN_GPIOL2, PIN_GPIOL3 };
cs_bits |= bits[input];
...
Not sure if I'd want to write it either way. What do you think?
To view, visit change 55695. To unsubscribe, or for help writing mail filters, visit settings.
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I2b84ede01759c80f69d5ad17e43783d09ecd1107
Gerrit-Change-Number: 55695
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Alan Green <avg@google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Samir Ibradžić <sibradzic@gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Attention: Alan Green <avg@google.com>
Gerrit-Attention: Angel Pons <th3fanbus@gmail.com>
Gerrit-Attention: Samir Ibradžić <sibradzic@gmail.com>
Gerrit-Comment-Date: Sun, 20 Jun 2021 15:08:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Angel Pons <th3fanbus@gmail.com>
Gerrit-MessageType: comment