Skip to content

Commit c3aaab3

Browse files
authored
Convert stm32-lcd-logo to use mmio (#100)
Replaces the register definitions used by the stm32-lcd-logo example to use ones generated by svd2swift leveraging swift-mmio. Additionally refactors much of the example code to have fewer layers of abstraction as they make the code much harder to follow.
1 parent ec33a94 commit c3aaab3

35 files changed

+5885
-9810
lines changed

.swiftformatignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
./harmony/*
2+
./stm32-lcd-logo/Sources/Application/Registers/*
23
./stm32-neopixel/Sources/Application/Registers/*
34
./stm32-uart-echo/Sources/Application/Registers/*

stm32-lcd-logo/Package.resolved

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

stm32-lcd-logo/Package.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ let package = Package(
1111
.executable(name: "Application", targets: ["Application"])
1212
],
1313
dependencies: [
14-
// .package(url: "https://github.com/apple/swift-mmio", branch: "main")
14+
.package(url: "https://github.com/apple/swift-mmio", branch: "main")
1515
],
1616
targets: [
1717
// SVD2Swift \
1818
// --input Tools/SVDs/stm32f7x6.patched.svd \
1919
// --output stm32-lcd-logo/Sources/STM32F7x6 \
20-
// --peripherals LTDC RCC GPIOA GPIOB GPIOC GPIOD GPIOE GPIOF GPIOG GPIOH GPIOI GPIOJ GPIOK
20+
// --peripherals FLASH GPIOA GPIOB GPIOC GPIOD GPIOE GPIOF GPIOG GPIOH GPIOI GPIOJ GPIOK LTDC RCC
2121
.executableTarget(
2222
name: "Application",
2323
dependencies: [
24-
// .product(name: "MMIO", package: "swift-mmio"),
25-
"Support"
24+
.product(name: "MMIO", package: "swift-mmio"),
25+
"Support",
2626
]),
2727
.target(name: "Support"),
2828
])

stm32-lcd-logo/Sources/Application/Board.swift

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)