We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9bb887 commit 465deb0Copy full SHA for 465deb0
stm32-lcd-logo/Sources/Application/HAL/LTDC+Helpers.swift
@@ -187,8 +187,8 @@ extension LTDC {
187
188
// FIXME: Escaping a pointer like this is very unsafe.
189
// We get away with it because `pixelData` is a global let.
190
- pixelData._withUnsafeBufferPointer { pointer in
191
- let data = UInt32(UInt(bitPattern: pointer.baseAddress!))
+ pixelData.span.withUnsafeBytes { buffer in
+ let data = UInt32(UInt(bitPattern: buffer.baseAddress!))
192
self.layer[1].cfbar.modify { $0.raw.storage = data }
193
}
194
self.layer[1].cacr.modify { $0.raw.consta = 255 }
0 commit comments