1.1 --- a/pkg/devices/cpm/src/client/cpm-client.cc Fri Jan 01 00:49:07 2021 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,101 +0,0 @@
1.4 -/*
1.5 - * CPM client to access CPM servers.
1.6 - *
1.7 - * Copyright (C) 2018, 2020 Paul Boddie <paul@boddie.org.uk>
1.8 - *
1.9 - * This program is free software; you can redistribute it and/or
1.10 - * modify it under the terms of the GNU General Public License as
1.11 - * published by the Free Software Foundation; either version 2 of
1.12 - * the License, or (at your option) any later version.
1.13 - *
1.14 - * This program is distributed in the hope that it will be useful,
1.15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.17 - * GNU General Public License for more details.
1.18 - *
1.19 - * You should have received a copy of the GNU General Public License
1.20 - * along with this program; if not, write to the Free Software
1.21 - * Foundation, Inc., 51 Franklin Street, Fifth Floor,
1.22 - * Boston, MA 02110-1301, USA
1.23 - */
1.24 -
1.25 -#include <l4/cxx/ipc_stream>
1.26 -#include <l4/re/env>
1.27 -
1.28 -#include "cpm-client.h"
1.29 -#include "cpm-ops.h"
1.30 -
1.31 -int
1.32 -Cpm_device_interface::get_lcd_pixel_frequency(uint32_t *frequency) throw()
1.33 -{
1.34 - L4::Ipc::Iostream s(l4_utcb());
1.35 - int err = l4_error(s.call(cap(), Cpm_op_get_lcd_pixel_frequency));
1.36 - uint32_t _frequency;
1.37 -
1.38 - if (err)
1.39 - return err;
1.40 -
1.41 - s >> _frequency;
1.42 - *frequency = _frequency;
1.43 - return L4_EOK;
1.44 -}
1.45 -
1.46 -int
1.47 -Cpm_device_interface::set_hdmi_frequency(uint32_t frequency) throw()
1.48 -{
1.49 - L4::Ipc::Iostream s(l4_utcb());
1.50 -
1.51 - s << frequency;
1.52 -
1.53 - return l4_error(s.call(cap(), Cpm_op_set_hdmi_frequency));
1.54 -}
1.55 -
1.56 -int
1.57 -Cpm_device_interface::start_hdmi() throw()
1.58 -{
1.59 - L4::Ipc::Iostream s(l4_utcb());
1.60 -
1.61 - return l4_error(s.call(cap(), Cpm_op_start_hdmi));
1.62 -}
1.63 -
1.64 -int
1.65 -Cpm_device_interface::stop_hdmi() throw()
1.66 -{
1.67 - L4::Ipc::Iostream s(l4_utcb());
1.68 -
1.69 - return l4_error(s.call(cap(), Cpm_op_stop_hdmi));
1.70 -}
1.71 -
1.72 -int
1.73 -Cpm_device_interface::set_lcd_frequencies(uint32_t pclk, uint8_t multiplier) throw()
1.74 -{
1.75 - L4::Ipc::Iostream s(l4_utcb());
1.76 -
1.77 - s << pclk << multiplier;
1.78 -
1.79 - return l4_error(s.call(cap(), Cpm_op_set_lcd_frequencies));
1.80 -}
1.81 -
1.82 -int
1.83 -Cpm_device_interface::start_lcd() throw()
1.84 -{
1.85 - L4::Ipc::Iostream s(l4_utcb());
1.86 -
1.87 - return l4_error(s.call(cap(), Cpm_op_start_lcd));
1.88 -}
1.89 -
1.90 -int
1.91 -Cpm_device_interface::stop_lcd() throw()
1.92 -{
1.93 - L4::Ipc::Iostream s(l4_utcb());
1.94 -
1.95 - return l4_error(s.call(cap(), Cpm_op_stop_lcd));
1.96 -}
1.97 -
1.98 -int
1.99 -Cpm_device_interface::update_output_frequency() throw()
1.100 -{
1.101 - L4::Ipc::Iostream s(l4_utcb());
1.102 -
1.103 - return l4_error(s.call(cap(), Cpm_op_update_output_frequency));
1.104 -}