blob: 0e2f6ab7208bd4e2922b814e9b1c6a86925871b6 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#pragma once
#include <unistd.h>
#include <zircon/compiler.h>
#include <ddk/protocol/platform/device.h>
#include <fbl/unique_ptr.h>
#include <hwreg/mmio.h>
#include <ddk/protocol/gpio.h>
#include <ddktl/protocol/dsiimpl.h>
namespace astro_display {
class Lcd {
Lcd(uint8_t panel_type) : panel_type_(panel_type) {}
zx_status_t Init(zx_device_t* dsi_dev, zx_device_t* gpio_dev);
zx_status_t Enable();
zx_status_t Disable();
zx_status_t LoadInitTable(const uint8_t* buffer, size_t size);
zx_status_t GetDisplayId();
uint8_t panel_type_;
gpio_protocol_t gpio_ = {};
ddk::DsiImplProtocolClient dsiimpl_;
bool initialized_ = false;
bool enabled_ =false;
} // namespace astro_display