Skip to content

Source: platform_config.h

platform_config_desktop

What the host build claims to be: generous memory, every driver linked, no real silicon.

Enumerations

Name Description
[CodecType] Which codec sits in front of the microphone; a host has none.
[EthPhyType] Which Ethernet PHY a board carries; kept in step with the ESP32 list so every name resolves here.

CodecType

enum CodecType

Which codec sits in front of the microphone; a host has none.

Value Description
None
Es8311
None
Es8311

EthPhyType

enum EthPhyType

Which Ethernet PHY a board carries; kept in step with the ESP32 list so every name resolves here.

Value Description
ethNone no Ethernet on this board, the default
ethLan8720 RMII, generic PHY.
ethIp101 RMII, IP101 PHY, P4 only.
ethW5500 SPI, an external W5500 module.
ethYt8531 RGMII, the S31's 1 Gb PHY.
ethOpeneth the emulator's MAC, which is what gives an emulated device a real IP stack
ethNone no Ethernet on this board, the default
ethLan8720 RMII, generic PHY.
ethIp101 RMII, IP101 PHY, P4 only.
ethW5500 SPI, an external W5500 module.
ethYt8531 RGMII, the S31's 1 Gb PHY.
ethOpeneth the emulator's MAC, which is what gives an emulated device a real IP stack

Variables

Return Name Description
constexpr bool hasPsram constexpr A host has memory to spare, so it answers the PSRAM question the generous way.
constexpr bool isEsp32P4 constexpr Not a P4, so its Ethernet pin map and co-processor WiFi compile out.
constexpr bool isEsp32S3 constexpr Not an S3, so its W5500 Ethernet default compiles out.
constexpr bool isEsp32S31 constexpr Not an S31, so its RGMII PHY compiles out.
constexpr uint8_t rmtTxChannels constexpr RMT channels the host reports, matching the S3 and P4 count rather than the classic chip's eight.
constexpr EthFixedPad ethFixedPads constexpr A single dummy entry: a zero-size array is an extension MSVC refuses, and Windows CI compiles this.
constexpr uint8_t ethFixedPadCount constexpr None, a host's Ethernet being a named interface rather than wired signals.
constexpr uint8_t lcdLanes constexpr Parallel lanes the host reports, deliberately not zero.
constexpr bool hasLcdCam constexpr True on the host, which emulates the peripheral rather than declaring itself incapable.
constexpr uint8_t parlioLanes constexpr Parlio lanes the host reports, on the same reasoning as lcdLanes.
constexpr uint8_t i2sLanes constexpr Zero, because the i80 backend sums this with lcdLanes and would otherwise claim 32 lanes.
constexpr bool hasI2sMic constexpr No pin-wired microphone on a host; live audio arrives through capture devices instead.
constexpr bool hasAudioCapture constexpr OS capture devices, reaching the same audioMicRead seam a wired microphone would.
constexpr CodecType audioCodecType constexpr None, a host having no codec to configure.
constexpr AudioCodecPins [audioCodecPins] constexpr Unused, there being no codec to reach.
constexpr bool hasWiFi constexpr True, so the host compiles the WiFi path even though it ships stubs behind it.
constexpr bool hasEthernet constexpr False, so shared code compiles its Ethernet controls out and seeds itself from the default below.
constexpr bool previewsEthernetControls constexpr True: the Ethernet CONTROLS are built though no interface exists, so the board presets can be exercised without a device. A preview of a device-only card, tagged developer-mode and never consulted by a bring-up path, which stays keyed on hasEthernet.
constexpr bool hasNamedNetInterfaces constexpr True: a host has several NICs, so a raw sender must name the one it binds.
constexpr bool hasNdi constexpr True: a host can be an NDI video source.
constexpr bool hasHls constexpr True: the host streams H.264 by piping frames to the ffmpeg on PATH, a dependency of the user's.
constexpr bool hasRtsp constexpr True: ffmpeg encodes the elementary stream and MoonLight's own RTSP server ships it.
constexpr bool hasEncoderChoice constexpr True: ffmpeg offers several encoders, so the pick is the user's.
constexpr bool hasFsSegments constexpr True: ffmpeg writes the playlist to disk, so the server serves segments as files.
constexpr bool hasNetwork constexpr Whether any IP stack is present, which is what UDP interop gates on.
constexpr bool ethPhyIsFixed constexpr False: a host has no Ethernet to fix, so nothing overrides a catalog-supplied PHY type.
constexpr bool hasHeavyCompute constexpr Headroom for a per-pixel float algorithm, which a desktop CPU has to spare.
constexpr bool hasEthW5500 constexpr False: no SPI-Ethernet driver here, which the live-reconfigure path gates on.
constexpr EthPinConfig ethConfigDefault constexpr No Ethernet to seed, so every field is unset.
constexpr bool hasWifiCoprocessor constexpr False: no separate WiFi co-processor, so its read-out and control compile out.
constexpr bool hasOta constexpr False: no OTA partition to write, so the firmware routes answer a stub instead.
constexpr bool hasImprov constexpr False: no UART and no WiFi stack, so the provisioning listener is never installed.

hasPsram

constexpr

constexpr bool hasPsram = true

A host has memory to spare, so it answers the PSRAM question the generous way.


isEsp32P4

constexpr

constexpr bool isEsp32P4 = false

Not a P4, so its Ethernet pin map and co-processor WiFi compile out.


isEsp32S3

constexpr

constexpr bool isEsp32S3 = false

Not an S3, so its W5500 Ethernet default compiles out.


isEsp32S31

constexpr

constexpr bool isEsp32S31 = false

Not an S31, so its RGMII PHY compiles out.


rmtTxChannels

constexpr

constexpr uint8_t rmtTxChannels = 4

RMT channels the host reports, matching the S3 and P4 count rather than the classic chip's eight.


ethFixedPads

constexpr

constexpr EthFixedPad ethFixedPads = {{"", 0}}

A single dummy entry: a zero-size array is an extension MSVC refuses, and Windows CI compiles this.


ethFixedPadCount

constexpr

constexpr uint8_t ethFixedPadCount = 0

None, a host's Ethernet being a named interface rather than wired signals.


lcdLanes

constexpr

constexpr uint8_t lcdLanes = 16

Parallel lanes the host reports, deliberately not zero.


hasLcdCam

constexpr

constexpr bool hasLcdCam = true

True on the host, which emulates the peripheral rather than declaring itself incapable.


parlioLanes

constexpr

constexpr uint8_t parlioLanes = 16

Parlio lanes the host reports, on the same reasoning as lcdLanes.


i2sLanes

constexpr

constexpr uint8_t i2sLanes = 0

Zero, because the i80 backend sums this with lcdLanes and would otherwise claim 32 lanes.


hasI2sMic

constexpr

constexpr bool hasI2sMic = false

No pin-wired microphone on a host; live audio arrives through capture devices instead.


hasAudioCapture

constexpr

constexpr bool hasAudioCapture = true

OS capture devices, reaching the same audioMicRead seam a wired microphone would.

False: capture devices are a host concept, and a board uses the wired microphone above.


audioCodecType

constexpr

constexpr CodecType audioCodecType = CodecType::None

None, a host having no codec to configure.


audioCodecPins

constexpr

constexpr AudioCodecPins audioCodecPins = { 0, 0, 0, 0 }

Unused, there being no codec to reach.


hasWiFi

constexpr

constexpr bool hasWiFi = true

True, so the host compiles the WiFi path even though it ships stubs behind it.


hasEthernet

constexpr

constexpr bool hasEthernet = false

False, so shared code compiles its Ethernet controls out and seeds itself from the default below.


previewsEthernetControls

constexpr

constexpr bool previewsEthernetControls = true

True: the Ethernet CONTROLS are built though no interface exists, so the board presets can be exercised without a device. A preview of a device-only card, tagged developer-mode and never consulted by a bring-up path, which stays keyed on hasEthernet.

False: the controls follow the hardware, so a board without Ethernet shows nothing to configure.


hasNamedNetInterfaces

constexpr

constexpr bool hasNamedNetInterfaces = true

True: a host has several NICs, so a raw sender must name the one it binds.

False: one MAC per chip, so a raw sender has nothing to choose and the control would do nothing.


hasNdi

constexpr

constexpr bool hasNdi = true

True: a host can be an NDI video source.

False on every ESP32, and not by choice: the runtime is a closed binary for Intel and ARM alone.


hasHls

constexpr

constexpr bool hasHls = true

True: the host streams H.264 by piping frames to the ffmpeg on PATH, a dependency of the user's.


hasRtsp

constexpr

constexpr bool hasRtsp = true

True: ffmpeg encodes the elementary stream and MoonLight's own RTSP server ships it.

True with the same encoder HLS uses: RTSP ships that encoder's frames without muxing them.


hasEncoderChoice

constexpr

constexpr bool hasEncoderChoice = true

True: ffmpeg offers several encoders, so the pick is the user's.

False: one hardware encoder, so there is nothing to choose and the control stays hidden.


hasFsSegments

constexpr

constexpr bool hasFsSegments = true

True: ffmpeg writes the playlist to disk, so the server serves segments as files.

False: segments live in a PSRAM ring, flash wear buying nothing for a file stale within seconds.


hasNetwork

constexpr

constexpr bool hasNetwork = hasWiFi || hasEthernet

Whether any IP stack is present, which is what UDP interop gates on.


ethPhyIsFixed

constexpr

constexpr bool ethPhyIsFixed = false

False: a host has no Ethernet to fix, so nothing overrides a catalog-supplied PHY type.


hasHeavyCompute

constexpr

constexpr bool hasHeavyCompute = true

Headroom for a per-pixel float algorithm, which a desktop CPU has to spare.


hasEthW5500

constexpr

constexpr bool hasEthW5500 = false

False: no SPI-Ethernet driver here, which the live-reconfigure path gates on.


ethConfigDefault

constexpr

constexpr EthPinConfig ethConfigDefault { ethNone, 0, -1, -1, -1, -1, false, -1, -1, -1, -1, -1 }

No Ethernet to seed, so every field is unset.


hasWifiCoprocessor

constexpr

constexpr bool hasWifiCoprocessor = false

False: no separate WiFi co-processor, so its read-out and control compile out.


hasOta

constexpr

constexpr bool hasOta = false

False: no OTA partition to write, so the firmware routes answer a stub instead.

True on every ESP32 build, the partition layout reserving both app slots unconditionally.


hasImprov

constexpr

constexpr bool hasImprov = false

False: no UART and no WiFi stack, so the provisioning listener is never installed.

True on every ESP32: the serial RPC channel is always there, so the listener always runs.

AudioCodecPins

struct AudioCodecPins
src/platform/desktop/platform_config.h:67

How a codec is reached, mirrored from the ESP32 config so the names resolve everywhere.

How that codec is reached: a fixed board property, so it lives here rather than as a control.

@moreinfo The microphone's own data pins stay user controls; only the codec's wiring is fixed.

Public Attributes

uint16_t i2cSda : I2C data.

uint16_t i2cScl : I2C clock.

uint16_t mclk : the master clock the codec needs, separate from the bit clock

uint8_t i2cAddr : the codec's I2C address

EthFixedPad

struct EthFixedPad
src/platform/desktop/platform_config.h:41

One pad an EMAC's data interface owns, which a host has none of.

One pad the EMAC's data interface owns: the signal it carries, and the GPIO silicon fixed it to.

@moreinfo Neither RGMII on the S31 nor RMII on the P4 is configurable, so these are reported as fixed pins rather than published as controls. One list serves both the driver init and the pin map, which keeps the MAC's wiring and the map's label from drifting apart. A pad nobody declares reads as free while the MAC drives it: an LED lane on GPIO 10 corrupted every frame sent, with the link still reporting 1 Gb.

Public Attributes

const char * name

uint8_t gpio

EthPinConfig

struct EthPinConfig
src/platform/desktop/platform_config.h:80

How that PHY is wired, mirrored from the ESP32 struct; the host stub ignores it.

How a board wires its Ethernet, set at runtime from the catalog; -1 leaves a field unused.

@moreinfo The RMII fields serve the internal EMAC and the SPI fields a W5500, with the default below seeding an un-provisioned board. The RMII data lines are absent because no board varies them: they are fixed in silicon or already defaulted by the SDK.

Public Attributes

int phyType : which EthPhyType

int phyAddr : the PHY's address on the management bus

int mdcGpio : management clock

int mdioGpio : management data

int rstGpio : PHY reset.

int rmiiClockGpio : the 50 MHz reference clock pin

bool rmiiClockExtIn : true when the board feeds the clock in, false when the chip drives it out

int spiMiso : W5500 data in.

int spiMosi : W5500 data out.

int spiSck : W5500 clock.

int spiCs : W5500 chip select.

int spiIrq : W5500 interrupt.

More info

The lane counts are not zero

A zero makes every parallel backend report "not my silicon", so the driver idles and its body never runs off-device: not runnable, not unit-testable, invisible to every check. Sixteen is the widest real rig, so the host exercises the same lane-splitting arithmetic the hardware does. The bus behind them is a heap buffer, holding real WS2812 patterns in real memory, with only the DMA hand-off absent.

Types exist even where the feature does not

The platform header declares one signature per seam for every target, so the Ethernet and codec types must resolve here even though a host has neither. The stubs ignore them, and shared code gates on the capability flags instead.