mirror of
https://github.com/lupyuen/pinephone-nuttx.git
synced 2025-01-12 20:58:34 +08:00
Adding Zig renderer
This commit is contained in:
parent
eed12c8027
commit
ff95360cf4
1 changed files with 57 additions and 0 deletions
57
render.zig
Normal file
57
render.zig
Normal file
|
@ -0,0 +1,57 @@
|
|||
//***************************************************************************
|
||||
//
|
||||
// Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
// contributor license agreements. See the NOTICE file distributed with
|
||||
// this work for additional information regarding copyright ownership. The
|
||||
// ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance with the
|
||||
// License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
// License for the specific language governing permissions and limitations
|
||||
// under the License.
|
||||
//
|
||||
//***************************************************************************
|
||||
|
||||
//! PinePhone MIPI DSI Driver for Apache NuttX RTOS.
|
||||
//! This MIPI DSI Interface is compatible with Zephyr MIPI DSI:
|
||||
//! https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/drivers/mipi_dsi.h
|
||||
|
||||
/// Import the Zig Standard Library
|
||||
const std = @import("std");
|
||||
|
||||
/// Import the LoRaWAN Library from C
|
||||
const c = @cImport({
|
||||
// NuttX Defines
|
||||
@cDefine("__NuttX__", "");
|
||||
@cDefine("NDEBUG", "");
|
||||
@cDefine("FAR", "");
|
||||
|
||||
// NuttX Framebuffer Defines
|
||||
@cDefine("CONFIG_FB_OVERLAY", "");
|
||||
|
||||
// NuttX Header Files
|
||||
@cInclude("arch/types.h");
|
||||
@cInclude("../../nuttx/include/limits.h");
|
||||
@cInclude("nuttx/config.h");
|
||||
@cInclude("inttypes.h");
|
||||
@cInclude("unistd.h");
|
||||
@cInclude("stdlib.h");
|
||||
@cInclude("stdio.h");
|
||||
|
||||
// NuttX Framebuffer Header Files
|
||||
@cInclude("nuttx/video/fb.h");
|
||||
});
|
||||
|
||||
pub export fn test_render() void {
|
||||
const v = std.mem.zeroes(c.struct_fb_videoinfo_s);
|
||||
_ = v;
|
||||
const p = std.mem.zeroes(c.fb_planeinfo_s);
|
||||
_ = p;
|
||||
const o = std.mem.zeroes(c.struct_fb_overlayinfo_s);
|
||||
_ = o;
|
||||
}
|
Loading…
Reference in a new issue