1.1 --- a/pkg/landfall-examples/ci20_hdmi_i2c/ci20_hdmi_i2c.c Sat May 23 16:05:22 2020 +0200
1.2 +++ b/pkg/landfall-examples/ci20_hdmi_i2c/ci20_hdmi_i2c.c Sat May 23 22:34:17 2020 +0200
1.3 @@ -1,14 +1,22 @@
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 Paul Boddie <paul@boddie.org.uk>
1.8 - *
1.9 - * This file is part of TUD:OS and distributed under the terms of the
1.10 - * GNU General Public License 2.
1.11 - * Please see the COPYING-GPL-2 file for details.
1.12 - */
1.13 /*
1.14 * Access the HDMI I2C peripheral on the MIPS Creator CI20 board.
1.15 + *
1.16 + * Copyright (C) 2020 Paul Boddie <paul@boddie.org.uk>
1.17 + *
1.18 + * This program is free software; you can redistribute it and/or
1.19 + * modify it under the terms of the GNU General Public License as
1.20 + * published by the Free Software Foundation; either version 2 of
1.21 + * the License, or (at your option) any later version.
1.22 + *
1.23 + * This program is distributed in the hope that it will be useful,
1.24 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.25 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.26 + * GNU General Public License for more details.
1.27 + *
1.28 + * You should have received a copy of the GNU General Public License
1.29 + * along with this program; if not, write to the Free Software
1.30 + * Foundation, Inc., 51 Franklin Street, Fifth Floor,
1.31 + * Boston, MA 02110-1301, USA
1.32 */
1.33
1.34 #include <l4/devices/cpm-jz4780.h>
1.35 @@ -265,6 +273,11 @@
1.36
1.37 printf("HDMI version is %x.%03x\n", hdmi_major, hdmi_minor);
1.38
1.39 + printf("Connected: %s\n", jz4780_hdmi_connected(hdmi) ? "yes" : "no");
1.40 +
1.41 + while (!jz4780_hdmi_connected(hdmi))
1.42 + jz4780_hdmi_wait_for_connection(hdmi);
1.43 +
1.44 printf("Read EDID...\n");
1.45
1.46 jz4780_hdmi_i2c_set_address(hdmi, 0x50);