code generator that automatically switches endianness

This commit is contained in:
Vinzenz Schroeter 2024-04-20 15:54:17 +02:00
commit 5532c4f5a8

View file

@ -1,17 +1,19 @@
using System.Runtime.InteropServices;
using EndiannessSourceGenerator;
namespace DisplayCommands.Internals;
[StructEndianness(IsLittleEndian = false)]
[StructLayout(LayoutKind.Sequential, Pack = 16, Size = 10)]
internal struct HeaderBitmap
internal partial struct HeaderBitmap
{
public DisplayCommand Command;
private ushort _command;
public ushort Offset;
private ushort _offset;
public ushort Length;
private ushort _length;
public DisplaySubCommand SubCommand;
private ushort _subCommand;
public ushort Reserved;
}
private ushort _reserved;
}