summaryrefslogtreecommitdiff
path: root/board/nucleo-f411re
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2021-11-18 16:54:54 -0700
committerCommit Bot <commit-bot@chromium.org>2021-11-30 23:55:40 +0000
commit5e751370559ed41302a06c2b664c0f47f7f1bb89 (patch)
tree819fa1900ca57cfb728ff5dc211573d6b1a4ffc7 /board/nucleo-f411re
parentcdc4811ebe80e0e7a0edeb093dc74b9d947290bb (diff)
downloadchrome-ec-5e751370559ed41302a06c2b664c0f47f7f1bb89.tar.gz
i2c: Use declared initializers for i2c_ports: eval boards
Convert all instances of i2c_ports[] to use declared initializers. This allows the fields to be reordered without breaking code. BUG=none BRANCH=none TEST=compare_build.sh Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ib6f4bd684f76a34a74ddd8f476c78223b8ccf2bb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3300659 Reviewed-by: Eric Yilun Lin <yllin@google.com>
Diffstat (limited to 'board/nucleo-f411re')
-rw-r--r--board/nucleo-f411re/board.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/board/nucleo-f411re/board.c b/board/nucleo-f411re/board.c
index 074507e039..96e7fefb69 100644
--- a/board/nucleo-f411re/board.c
+++ b/board/nucleo-f411re/board.c
@@ -52,8 +52,13 @@ BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT);
/* I2C ports */
const struct i2c_port_t i2c_ports[] = {
- {"master", I2C_PORT_MASTER, 100,
- GPIO_MASTER_I2C_SCL, GPIO_MASTER_I2C_SDA},
+ {
+ .name = "master",
+ .port = I2C_PORT_MASTER,
+ .kbps = 100,
+ .scl = GPIO_MASTER_I2C_SCL,
+ .sda = GPIO_MASTER_I2C_SDA
+ },
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);