Skip to content

Commit bec7aa4

Browse files
committed
Replace C Array with InlineArray
The stm32-lcd-logo example used a large C Array to define the logo pixel data, this commit updates the example to use the new InlineArray type in Swift.
1 parent d8d9581 commit bec7aa4

File tree

5 files changed

+434
-445
lines changed

5 files changed

+434
-445
lines changed

stm32-lcd-logo/Package.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import PackageDescription
55
let package = Package(
66
name: "stm32-lcd-logo",
77
platforms: [
8-
.macOS(.v10_15)
8+
.macOS("16")
99
],
1010
products: [
1111
.executable(name: "Application", targets: ["Application"])
@@ -23,6 +23,10 @@ let package = Package(
2323
dependencies: [
2424
.product(name: "MMIO", package: "swift-mmio"),
2525
"Support",
26+
],
27+
swiftSettings: [
28+
.enableExperimentalFeature("InlineArrayTypeSugar"),
29+
.enableExperimentalFeature("SymbolLinkageMarkers"),
2630
]),
2731
.target(name: "Support"),
2832
])

stm32-lcd-logo/Sources/Application/Main.swift renamed to stm32-lcd-logo/Sources/Application/Application.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import Support
1313

1414
@main
15-
struct Main {
15+
struct Application {
1616
static let logoSize = Size(
1717
width: LTDC.Constants.layerWidth,
1818
height: LTDC.Constants.layerHeight)

0 commit comments

Comments
 (0)