Skip to content

Commit 3447722

Browse files
committed
wip
1 parent 1c302c8 commit 3447722

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stm32-lcd-logo/Sources/Application/HAL/LTDC+Helpers.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ extension LTDC {
187187

188188
// FIXME: Escaping a pointer like this is very unsafe.
189189
// We get away with it because `pixelData` is a global let.
190-
pixelData._withUnsafeBufferPointer { pointer in
191-
let data = UInt32(UInt(bitPattern: pointer.baseAddress!))
190+
pixelData.span.withUnsafeBytes { buffer in
191+
let data = UInt32(UInt(bitPattern: buffer.baseAddress!))
192192
self.layer[1].cfbar.modify { $0.raw.storage = data }
193193
}
194194
self.layer[1].cacr.modify { $0.raw.consta = 255 }

0 commit comments

Comments
 (0)