# HG changeset patch # User Paul Boddie # Date 1717769842 -7200 # Node ID 27bc7529054128aebd6bfff2da2b5953c0dffc1c # Parent c729da7ceb33c1100d7bebfbc5784e05d6900568 Added an example featuring the X1600 and ST7789-based display. diff -r c729da7ceb33 -r 27bc75290541 conf/landfall-examples/mips-lx16-common.io --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conf/landfall-examples/mips-lx16-common.io Fri Jun 07 16:17:22 2024 +0200 @@ -0,0 +1,20 @@ +-- vim: ft=lua ts=2 et sw=2 + +-- Configuration file for Io. + +local hw = Io.system_bus() + +local bus = Io.Vi.System_bus +{ + AIC = wrap(hw:match("x1600-aic")); + CPM = wrap(hw:match("x1600-cpm")); + DMA = wrap(hw:match("x1600-dma")); + GPIO = wrap(hw:match("x1600-gpio")); + I2C = wrap(hw:match("x1600-i2c")); + MSC = wrap(hw:match("x1600-msc")); + RTC = wrap(hw:match("x1600-rtc")); + SSI = wrap(hw:match("x1600-ssi")); + TCU = wrap(hw:match("x1600-tcu")); +} + +Io.add_vbus("common", bus) diff -r c729da7ceb33 -r 27bc75290541 conf/landfall-examples/mips-lx16-spi-spectrum.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conf/landfall-examples/mips-lx16-spi-spectrum.cfg Fri Jun 07 16:17:22 2024 +0200 @@ -0,0 +1,62 @@ +-- vim: ft=lua ts=2 et sw=2 + +-- Start Mag to multiplex the framebuffer showing only a single program. +-- This example shows an animation showing off a spectrum of colours. +-- The target platform is the Letux X16. + +local L4 = require("L4"); + +local l = L4.default_loader; + +-- Define general access to peripherals. + +local io_buses = { + common = l:new_channel(); + }; + +l:start({ + caps = { + common = io_buses.common:svr(), + icu = L4.Env.icu, + sigma0 = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0), + }, + }, + "rom/io rom/hw_devices.io rom/mips-lx16-common.io"); + +-- Expose a framebuffer device. + +local fbdrv_fb = l:new_channel(); + +l:start({ + caps = { + vbus = io_buses.common, + fb = fbdrv_fb:svr(), + }, + }, + "rom/fb-drv"); + +-- Multiplex the framebuffer. + +local mag_caps = { + mag = l:new_channel(), + svc = l:new_channel(), + }; + +l:start({ + caps = { + vbus = io_buses.common, -- needed by input driver + fb = fbdrv_fb, + mag = mag_caps.mag:svr(), + svc = mag_caps.svc:svr(), + }, + }, + "rom/mag"); + +-- Show the spectrum example. + +l:start({ + caps = { + fb = mag_caps.svc:create(L4.Proto.Goos, "g=240x240+0+0", "barheight=10"), + }, + }, + "rom/ex_fb_spectrum_cc"); diff -r c729da7ceb33 -r 27bc75290541 conf/landfall-examples/mips-lx16-spi-spectrum.list --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conf/landfall-examples/mips-lx16-spi-spectrum.list Fri Jun 07 16:17:22 2024 +0200 @@ -0,0 +1,16 @@ + +modaddr 0x1100000 + +entry mips-lx16-spi-spectrum-example +bootstrap bootstrap -serial +kernel fiasco -serial_esc +roottask moe rom/mips-lx16-spi-spectrum.cfg +module mips-lx16-spi-spectrum.cfg +module mips-lx16-common.io +module plat-ingenic-x1600/hw_devices.io +module l4re +module io +module ned +module fb-drv +module mag +module ex_fb_spectrum_cc