Skip to content

Commit e5f395c

Browse files
committed
Add datasheets. Update playground.
1 parent 8d01a97 commit e5f395c

File tree

6 files changed

+1
-17
lines changed

6 files changed

+1
-17
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ sudo apt install libcurl3
1919
Sample Python configuration and bit shifting: https://github.com/switchdoclabs/SDL_Pi_Grove4Ch16BitADC/blob/58e2a8e32b03d2c463bde59821d210b16a792ad1/Adafruit_ADS1x15/Adafruit_ADS1x15.py#L266-L268
2020

2121
# Resources
22+
- Umberto Raimondi (uraimo) "SwiftyGPIO" https://github.com/uraimo/SwiftyGPIO
2223
- Marius Rackwitz "Swift HomeKit Accessories" https://speakerdeck.com/marius/diy-smarthome-build-your-own-homekit-accessories
2324
- Nate Cook "Swift's Pointy Bits: Unsafe Swift and Pointer Types" https://academy.realm.io/posts/nate-cook-tryswift-tokyo-unsafe-swift-and-pointer-types/
2425

Loading

datasheets/BCM2835_PDF_Datasheet.pdf

1.42 MB
Binary file not shown.

examples/UnsafeMemory.playground/Contents.swift

-17
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,6 @@ MemoryLayout<Bool>.size // returns 1
1616
MemoryLayout<Bool>.alignment // returns 1
1717
MemoryLayout<Bool>.stride // returns 1
1818

19-
MemoryLayout<Float>.size // returns 4
20-
MemoryLayout<Float>.alignment // returns 4
21-
MemoryLayout<Float>.stride // returns 4
22-
23-
MemoryLayout<Double>.size // returns 8
24-
MemoryLayout<Double>.alignment // returns 8
25-
MemoryLayout<Double>.stride // returns 8
26-
27-
struct EmptyStruct {}
28-
29-
MemoryLayout<EmptyStruct>.size // returns 0
30-
MemoryLayout<EmptyStruct>.alignment // returns 1
31-
MemoryLayout<EmptyStruct>.stride // returns 1
32-
3319
struct SampleStruct {
3420
let number: UInt32
3521
let flag: Bool
@@ -39,9 +25,6 @@ MemoryLayout<SampleStruct>.size // returns 5
3925
MemoryLayout<SampleStruct>.alignment // returns 4
4026
MemoryLayout<SampleStruct>.stride // returns 8
4127

42-
print("Hey")
43-
44-
4528
// 1
4629
let count = 2
4730
let stride = MemoryLayout<Int>.stride

0 commit comments

Comments
 (0)