1.1 --- a/pkg/landfall-examples/ci20_i2c/ci20_i2c.c Sat Apr 27 23:46:28 2024 +0200
1.2 +++ b/pkg/landfall-examples/ci20_i2c/ci20_i2c.c Sun Apr 28 18:37:08 2024 +0200
1.3 @@ -1,7 +1,8 @@
1.4 /*
1.5 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
1.6 * economic rights: Technische Universität Dresden (Germany)
1.7 - * Copyright (C) 2017, 2018, 2019, 2020, 2023 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2017, 2018, 2019, 2020, 2023,
1.9 + * 2024 Paul Boddie <paul@boddie.org.uk>
1.10 *
1.11 * This file is part of TUD:OS and distributed under the terms of the
1.12 * GNU General Public License 2.
1.13 @@ -264,8 +265,6 @@
1.14 l4_addr_t i2c_base = 0, i2c_base_end = 0;
1.15 l4_addr_t cpm_base = 0, cpm_base_end = 0;
1.16 l4_addr_t rtc_base = 0, rtc_base_end = 0;
1.17 - l4_addr_t port_d, port_d_end;
1.18 - l4_addr_t port_e, port_e_end;
1.19
1.20 /* Peripheral abstractions. */
1.21
1.22 @@ -379,16 +378,11 @@
1.23
1.24 /* Configure pins. */
1.25
1.26 - port_d = gpio_base + 0x300;
1.27 - port_d_end = port_d + 0x100;
1.28 - port_e = gpio_base + 0x400;
1.29 - port_e_end = port_e + 0x100;
1.30 + printf("PORTD at 0x%lx...0x%lx.\n", gpio_base + 0x300, gpio_base + 0x400);
1.31 + printf("PORTE at 0x%lx...0x%lx.\n", gpio_base + 0x400, gpio_base + 0x500);
1.32
1.33 - printf("PORTD at 0x%lx...0x%lx.\n", port_d, port_d_end);
1.34 - printf("PORTE at 0x%lx...0x%lx.\n", port_e, port_e_end);
1.35 -
1.36 - gpio_port_d = jz4780_gpio_init(port_d, port_d_end, 32, 0xffff4fff, 0x0000b000);
1.37 - gpio_port_e = jz4780_gpio_init(port_e, port_e_end, 32, 0xfffff37c, 0x00000483);
1.38 + gpio_port_d = jz4780_gpio_init(gpio_base, 3);
1.39 + gpio_port_e = jz4780_gpio_init(gpio_base, 4);
1.40
1.41 printf("Set up GPIO pins...\n");
1.42