Skip to content

Commit d162537

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 d162537

File tree

5 files changed

+433
-447
lines changed

5 files changed

+433
-447
lines changed

stm32-lcd-logo/Package.swift

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ import PackageDescription
44

55
let package = Package(
66
name: "stm32-lcd-logo",
7-
platforms: [
8-
.macOS(.v10_15)
9-
],
107
products: [
118
.executable(name: "Application", targets: ["Application"])
129
],
@@ -23,6 +20,10 @@ let package = Package(
2320
dependencies: [
2421
.product(name: "MMIO", package: "swift-mmio"),
2522
"Support",
23+
],
24+
swiftSettings: [
25+
.enableExperimentalFeature("InlineArrayTypeSugar"),
26+
.enableExperimentalFeature("SymbolLinkageMarkers"),
2627
]),
2728
.target(name: "Support"),
2829
])

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)