1.1 --- a/pkg/devices/cpm/src/client/cpm-client.cc Sat Jun 13 21:07:58 2020 +0200
1.2 +++ b/pkg/devices/cpm/src/client/cpm-client.cc Tue Jun 16 23:24:32 2020 +0200
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * CPM client to access CPM servers.
1.6 *
1.7 - * Copyright (C) 2018 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2018, 2020 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -26,6 +26,47 @@
1.13 #include "cpm-ops.h"
1.14
1.15 int
1.16 +Cpm_device_interface::get_lcd_pixel_frequency(uint32_t *frequency) throw()
1.17 +{
1.18 + L4::Ipc::Iostream s(l4_utcb());
1.19 + int err = l4_error(s.call(cap(), Cpm_op_get_lcd_pixel_frequency));
1.20 + uint32_t _frequency;
1.21 +
1.22 + if (err)
1.23 + return err;
1.24 +
1.25 + s >> _frequency;
1.26 + *frequency = _frequency;
1.27 + return L4_EOK;
1.28 +}
1.29 +
1.30 +int
1.31 +Cpm_device_interface::set_hdmi_frequency(uint32_t frequency) throw()
1.32 +{
1.33 + L4::Ipc::Iostream s(l4_utcb());
1.34 +
1.35 + s << frequency;
1.36 +
1.37 + return l4_error(s.call(cap(), Cpm_op_set_hdmi_frequency));
1.38 +}
1.39 +
1.40 +int
1.41 +Cpm_device_interface::start_hdmi() throw()
1.42 +{
1.43 + L4::Ipc::Iostream s(l4_utcb());
1.44 +
1.45 + return l4_error(s.call(cap(), Cpm_op_start_hdmi));
1.46 +}
1.47 +
1.48 +int
1.49 +Cpm_device_interface::stop_hdmi() throw()
1.50 +{
1.51 + L4::Ipc::Iostream s(l4_utcb());
1.52 +
1.53 + return l4_error(s.call(cap(), Cpm_op_stop_hdmi));
1.54 +}
1.55 +
1.56 +int
1.57 Cpm_device_interface::set_lcd_frequencies(uint32_t pclk, uint8_t multiplier) throw()
1.58 {
1.59 L4::Ipc::Iostream s(l4_utcb());