diff --git a/Examples/SwiftIOPlayground/12MoreProjects/FallingSand/.gitignore b/Examples/SwiftIOPlayground/12FileSystem/Album/.gitignore similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/FallingSand/.gitignore rename to Examples/SwiftIOPlayground/12FileSystem/Album/.gitignore diff --git a/Examples/SwiftIOPlayground/12MoreProjects/FallingSand/Package.mmp b/Examples/SwiftIOPlayground/12FileSystem/Album/Package.mmp similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/FallingSand/Package.mmp rename to Examples/SwiftIOPlayground/12FileSystem/Album/Package.mmp diff --git a/Examples/SwiftIOPlayground/12FileSystem/Album/Package.swift b/Examples/SwiftIOPlayground/12FileSystem/Album/Package.swift new file mode 100644 index 0000000..7995b97 --- /dev/null +++ b/Examples/SwiftIOPlayground/12FileSystem/Album/Package.swift @@ -0,0 +1,26 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "Album", + dependencies: [ + // Dependencies declare other packages that this package depends on. + .package(url: "https://github.com/madmachineio/SwiftIO.git", branch: "main"), + .package(url: "https://github.com/madmachineio/MadBoards.git", branch: "main"), + .package(url: "https://github.com/madmachineio/MadDrivers.git", branch: "main"), + ], + targets: [ + // Targets are the basic building blocks of a package, defining a module or a test suite. + // Targets can depend on other targets in this package and products from dependencies. + .executableTarget( + name: "Album", + dependencies: [ + "SwiftIO", + "MadBoards", + // Use specific library name rather than "MadDrivers" would speed up the build procedure. + .product(name: "ST7789", package: "MadDrivers") + ]), + ] +) diff --git a/Examples/SwiftIOPlayground/12FileSystem/Album/Resources/Photo/cat.bin b/Examples/SwiftIOPlayground/12FileSystem/Album/Resources/Photo/cat.bin new file mode 100644 index 0000000..fa9dbc0 --- /dev/null +++ b/Examples/SwiftIOPlayground/12FileSystem/Album/Resources/Photo/cat.bin @@ -0,0 +1,861 @@ +6}s}}Q}Qu1dTuPwVw;<<<;<<;;<<<[[[[[\\[[\<;;[;;ٶؾپ;;;;emQed\nL-L \mT-L dmup}qd\Ҧ;\||[;٦~T+)+3I3j;Cd}/uuOuOmddTLlTdeeee.uo}Ѷ:[||\[מTuvv;\|||||||||||\\[[[[ZoopppoO...-.//uM].eNe\L, i((((""g"G"("'"G"g"g"g# +J3j+j+j3jIGfWWVԅupu}ul\nTMuPԕWwvV;;;[\[\\[\\\[[\\\\\[;;;;ٶ;ٖVeq\dd\L,KdnKCdll}0}QuP;\\[;T]/+j"*+3I;C\ml}/}/}O}OmT4 4 , +Du/u/m.uOuo}mN]N2Z:::צ4}0}P}ouvv555V;\|||||||||\\;::9ƷƶѾopPPonM,-.uLLTDI4 + "##"""g*G*H"'*'"G"g"g#)333j+J+)g w}qLlL,dldT CmӍԍ}Ԟ6w;;;[\\\\\\\\\\\\\\\\;;;پٶVUw5mdToTLMCCL T-l}0}0Q}qu;[[;UuLL""3)3I3I;TlldduuueT<+ String { + return number < 10 ? "0\(number)" : "\(number)" + } + + func formatDateTime(_ time: PCF8563.Time) -> String { + var string = "" + string += "\(time.year)" + "/" + formatNum(time.month) + "/" + formatNum(time.day) + " " + string += formatNum(time.hour) + ":" + formatNum(time.minute) + ":" + formatNum(time.second) + return string + } + } +} \ No newline at end of file diff --git a/Examples/SwiftIOPlayground/12MoreProjects/MovingBall/.gitignore b/Examples/SwiftIOPlayground/13MoreProjects/FallingSand/.gitignore similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/MovingBall/.gitignore rename to Examples/SwiftIOPlayground/13MoreProjects/FallingSand/.gitignore diff --git a/Examples/SwiftIOPlayground/12MoreProjects/MovingBall/Package.mmp b/Examples/SwiftIOPlayground/13MoreProjects/FallingSand/Package.mmp similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/MovingBall/Package.mmp rename to Examples/SwiftIOPlayground/13MoreProjects/FallingSand/Package.mmp diff --git a/Examples/SwiftIOPlayground/12MoreProjects/FallingSand/Package.swift b/Examples/SwiftIOPlayground/13MoreProjects/FallingSand/Package.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/FallingSand/Package.swift rename to Examples/SwiftIOPlayground/13MoreProjects/FallingSand/Package.swift diff --git a/Examples/SwiftIOPlayground/12MoreProjects/FallingSand/Sources/Sand.swift b/Examples/SwiftIOPlayground/13MoreProjects/FallingSand/Sources/Sand.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/FallingSand/Sources/Sand.swift rename to Examples/SwiftIOPlayground/13MoreProjects/FallingSand/Sources/Sand.swift diff --git a/Examples/SwiftIOPlayground/12MoreProjects/FallingSand/Sources/main.swift b/Examples/SwiftIOPlayground/13MoreProjects/FallingSand/Sources/main.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/FallingSand/Sources/main.swift rename to Examples/SwiftIOPlayground/13MoreProjects/FallingSand/Sources/main.swift diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Pong/.gitignore b/Examples/SwiftIOPlayground/13MoreProjects/LifeGame/.gitignore similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Pong/.gitignore rename to Examples/SwiftIOPlayground/13MoreProjects/LifeGame/.gitignore diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Pong/Package.mmp b/Examples/SwiftIOPlayground/13MoreProjects/LifeGame/Package.mmp similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Pong/Package.mmp rename to Examples/SwiftIOPlayground/13MoreProjects/LifeGame/Package.mmp diff --git a/Examples/SwiftIOPlayground/12MoreProjects/LifeGame/Package.swift b/Examples/SwiftIOPlayground/13MoreProjects/LifeGame/Package.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/LifeGame/Package.swift rename to Examples/SwiftIOPlayground/13MoreProjects/LifeGame/Package.swift diff --git a/Examples/SwiftIOPlayground/12MoreProjects/LifeGame/Sources/main.swift b/Examples/SwiftIOPlayground/13MoreProjects/LifeGame/Sources/main.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/LifeGame/Sources/main.swift rename to Examples/SwiftIOPlayground/13MoreProjects/LifeGame/Sources/main.swift diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Prank/.gitignore b/Examples/SwiftIOPlayground/13MoreProjects/MorseCode/.gitignore similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Prank/.gitignore rename to Examples/SwiftIOPlayground/13MoreProjects/MorseCode/.gitignore diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Prank/Package.mmp b/Examples/SwiftIOPlayground/13MoreProjects/MorseCode/Package.mmp similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Prank/Package.mmp rename to Examples/SwiftIOPlayground/13MoreProjects/MorseCode/Package.mmp diff --git a/Examples/SwiftIOPlayground/12MoreProjects/MorseCode/Package.swift b/Examples/SwiftIOPlayground/13MoreProjects/MorseCode/Package.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/MorseCode/Package.swift rename to Examples/SwiftIOPlayground/13MoreProjects/MorseCode/Package.swift diff --git a/Examples/SwiftIOPlayground/12MoreProjects/MorseCode/Sources/MorseCode/MorseCode.swift b/Examples/SwiftIOPlayground/13MoreProjects/MorseCode/Sources/MorseCode/MorseCode.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/MorseCode/Sources/MorseCode/MorseCode.swift rename to Examples/SwiftIOPlayground/13MoreProjects/MorseCode/Sources/MorseCode/MorseCode.swift diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Snake/.gitignore b/Examples/SwiftIOPlayground/13MoreProjects/MovingBall/.gitignore similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Snake/.gitignore rename to Examples/SwiftIOPlayground/13MoreProjects/MovingBall/.gitignore diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Snake/Package.mmp b/Examples/SwiftIOPlayground/13MoreProjects/MovingBall/Package.mmp similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Snake/Package.mmp rename to Examples/SwiftIOPlayground/13MoreProjects/MovingBall/Package.mmp diff --git a/Examples/SwiftIOPlayground/12MoreProjects/MovingBall/Package.swift b/Examples/SwiftIOPlayground/13MoreProjects/MovingBall/Package.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/MovingBall/Package.swift rename to Examples/SwiftIOPlayground/13MoreProjects/MovingBall/Package.swift diff --git a/Examples/SwiftIOPlayground/12MoreProjects/MovingBall/Sources/MovingBall/MovingBall.swift b/Examples/SwiftIOPlayground/13MoreProjects/MovingBall/Sources/MovingBall/MovingBall.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/MovingBall/Sources/MovingBall/MovingBall.swift rename to Examples/SwiftIOPlayground/13MoreProjects/MovingBall/Sources/MovingBall/MovingBall.swift diff --git a/Examples/SwiftIOPlayground/12MoreProjects/TicTacToe/.gitignore b/Examples/SwiftIOPlayground/13MoreProjects/Pong/.gitignore similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/TicTacToe/.gitignore rename to Examples/SwiftIOPlayground/13MoreProjects/Pong/.gitignore diff --git a/Examples/SwiftIOPlayground/12MoreProjects/TicTacToe/Package.mmp b/Examples/SwiftIOPlayground/13MoreProjects/Pong/Package.mmp similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/TicTacToe/Package.mmp rename to Examples/SwiftIOPlayground/13MoreProjects/Pong/Package.mmp diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Pong/Package.swift b/Examples/SwiftIOPlayground/13MoreProjects/Pong/Package.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Pong/Package.swift rename to Examples/SwiftIOPlayground/13MoreProjects/Pong/Package.swift diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Pong/Resources/Sounds/hitball.wav b/Examples/SwiftIOPlayground/13MoreProjects/Pong/Resources/Sounds/hitball.wav similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Pong/Resources/Sounds/hitball.wav rename to Examples/SwiftIOPlayground/13MoreProjects/Pong/Resources/Sounds/hitball.wav diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Pong/Resources/Sounds/hitwall.wav b/Examples/SwiftIOPlayground/13MoreProjects/Pong/Resources/Sounds/hitwall.wav similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Pong/Resources/Sounds/hitwall.wav rename to Examples/SwiftIOPlayground/13MoreProjects/Pong/Resources/Sounds/hitwall.wav diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Pong/Resources/Sounds/score.wav b/Examples/SwiftIOPlayground/13MoreProjects/Pong/Resources/Sounds/score.wav similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Pong/Resources/Sounds/score.wav rename to Examples/SwiftIOPlayground/13MoreProjects/Pong/Resources/Sounds/score.wav diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Pong/Sources/Pong/Game.swift b/Examples/SwiftIOPlayground/13MoreProjects/Pong/Sources/Pong/Game.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Pong/Sources/Pong/Game.swift rename to Examples/SwiftIOPlayground/13MoreProjects/Pong/Sources/Pong/Game.swift diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Pong/Sources/Pong/Pong.swift b/Examples/SwiftIOPlayground/13MoreProjects/Pong/Sources/Pong/Pong.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Pong/Sources/Pong/Pong.swift rename to Examples/SwiftIOPlayground/13MoreProjects/Pong/Sources/Pong/Pong.swift diff --git a/Examples/SwiftIOPlayground/13MoreProjects/Prank/.gitignore b/Examples/SwiftIOPlayground/13MoreProjects/Prank/.gitignore new file mode 100644 index 0000000..0023a53 --- /dev/null +++ b/Examples/SwiftIOPlayground/13MoreProjects/Prank/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/Examples/SwiftIOPlayground/13MoreProjects/Prank/Package.mmp b/Examples/SwiftIOPlayground/13MoreProjects/Prank/Package.mmp new file mode 100644 index 0000000..102d0e2 --- /dev/null +++ b/Examples/SwiftIOPlayground/13MoreProjects/Prank/Package.mmp @@ -0,0 +1,17 @@ +# This is a MadMachine project file in TOML format +# This file holds those parameters that could not be managed by SwiftPM +# Edit this file would change the behavior of the building/downloading procedure +# Those project files in the dependent libraries would be IGNORED + +# Specify the board name below +# There are "SwiftIOBoard" and "SwiftIOMicro" now +board = "SwiftIOMicro" + +# Specifiy the target triple below +# There are "thumbv7em-unknown-none-eabi" and "thumbv7em-unknown-none-eabihf" now +# If your code use significant floating-point calculation, +# plz set it to "thumbv7em-unknown-none-eabihf" +triple = "thumbv7em-unknown-none-eabi" + +# Reserved for future use +version = 1 diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Prank/Package.swift b/Examples/SwiftIOPlayground/13MoreProjects/Prank/Package.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Prank/Package.swift rename to Examples/SwiftIOPlayground/13MoreProjects/Prank/Package.swift diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Prank/Resources/Sounds/Laugh.wav b/Examples/SwiftIOPlayground/13MoreProjects/Prank/Resources/Sounds/Laugh.wav similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Prank/Resources/Sounds/Laugh.wav rename to Examples/SwiftIOPlayground/13MoreProjects/Prank/Resources/Sounds/Laugh.wav diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Prank/Resources/Sounds/Pigs.wav b/Examples/SwiftIOPlayground/13MoreProjects/Prank/Resources/Sounds/Pigs.wav similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Prank/Resources/Sounds/Pigs.wav rename to Examples/SwiftIOPlayground/13MoreProjects/Prank/Resources/Sounds/Pigs.wav diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Prank/Resources/Sounds/Scream.wav b/Examples/SwiftIOPlayground/13MoreProjects/Prank/Resources/Sounds/Scream.wav similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Prank/Resources/Sounds/Scream.wav rename to Examples/SwiftIOPlayground/13MoreProjects/Prank/Resources/Sounds/Scream.wav diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Prank/Sources/main.swift b/Examples/SwiftIOPlayground/13MoreProjects/Prank/Sources/main.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Prank/Sources/main.swift rename to Examples/SwiftIOPlayground/13MoreProjects/Prank/Sources/main.swift diff --git a/Examples/SwiftIOPlayground/13MoreProjects/Snake/.gitignore b/Examples/SwiftIOPlayground/13MoreProjects/Snake/.gitignore new file mode 100644 index 0000000..0023a53 --- /dev/null +++ b/Examples/SwiftIOPlayground/13MoreProjects/Snake/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/Examples/SwiftIOPlayground/13MoreProjects/Snake/Package.mmp b/Examples/SwiftIOPlayground/13MoreProjects/Snake/Package.mmp new file mode 100644 index 0000000..102d0e2 --- /dev/null +++ b/Examples/SwiftIOPlayground/13MoreProjects/Snake/Package.mmp @@ -0,0 +1,17 @@ +# This is a MadMachine project file in TOML format +# This file holds those parameters that could not be managed by SwiftPM +# Edit this file would change the behavior of the building/downloading procedure +# Those project files in the dependent libraries would be IGNORED + +# Specify the board name below +# There are "SwiftIOBoard" and "SwiftIOMicro" now +board = "SwiftIOMicro" + +# Specifiy the target triple below +# There are "thumbv7em-unknown-none-eabi" and "thumbv7em-unknown-none-eabihf" now +# If your code use significant floating-point calculation, +# plz set it to "thumbv7em-unknown-none-eabihf" +triple = "thumbv7em-unknown-none-eabi" + +# Reserved for future use +version = 1 diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Snake/Package.swift b/Examples/SwiftIOPlayground/13MoreProjects/Snake/Package.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Snake/Package.swift rename to Examples/SwiftIOPlayground/13MoreProjects/Snake/Package.swift diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Snake/Sources/Snake.swift b/Examples/SwiftIOPlayground/13MoreProjects/Snake/Sources/Snake.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Snake/Sources/Snake.swift rename to Examples/SwiftIOPlayground/13MoreProjects/Snake/Sources/Snake.swift diff --git a/Examples/SwiftIOPlayground/12MoreProjects/Snake/Sources/main.swift b/Examples/SwiftIOPlayground/13MoreProjects/Snake/Sources/main.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/Snake/Sources/main.swift rename to Examples/SwiftIOPlayground/13MoreProjects/Snake/Sources/main.swift diff --git a/Examples/SwiftIOPlayground/13MoreProjects/TicTacToe/.gitignore b/Examples/SwiftIOPlayground/13MoreProjects/TicTacToe/.gitignore new file mode 100644 index 0000000..0023a53 --- /dev/null +++ b/Examples/SwiftIOPlayground/13MoreProjects/TicTacToe/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/Examples/SwiftIOPlayground/13MoreProjects/TicTacToe/Package.mmp b/Examples/SwiftIOPlayground/13MoreProjects/TicTacToe/Package.mmp new file mode 100644 index 0000000..102d0e2 --- /dev/null +++ b/Examples/SwiftIOPlayground/13MoreProjects/TicTacToe/Package.mmp @@ -0,0 +1,17 @@ +# This is a MadMachine project file in TOML format +# This file holds those parameters that could not be managed by SwiftPM +# Edit this file would change the behavior of the building/downloading procedure +# Those project files in the dependent libraries would be IGNORED + +# Specify the board name below +# There are "SwiftIOBoard" and "SwiftIOMicro" now +board = "SwiftIOMicro" + +# Specifiy the target triple below +# There are "thumbv7em-unknown-none-eabi" and "thumbv7em-unknown-none-eabihf" now +# If your code use significant floating-point calculation, +# plz set it to "thumbv7em-unknown-none-eabihf" +triple = "thumbv7em-unknown-none-eabi" + +# Reserved for future use +version = 1 diff --git a/Examples/SwiftIOPlayground/12MoreProjects/TicTacToe/Package.swift b/Examples/SwiftIOPlayground/13MoreProjects/TicTacToe/Package.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/TicTacToe/Package.swift rename to Examples/SwiftIOPlayground/13MoreProjects/TicTacToe/Package.swift diff --git a/Examples/SwiftIOPlayground/12MoreProjects/TicTacToe/Sources/TicTacToe/Game.swift b/Examples/SwiftIOPlayground/13MoreProjects/TicTacToe/Sources/TicTacToe/Game.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/TicTacToe/Sources/TicTacToe/Game.swift rename to Examples/SwiftIOPlayground/13MoreProjects/TicTacToe/Sources/TicTacToe/Game.swift diff --git a/Examples/SwiftIOPlayground/12MoreProjects/TicTacToe/Sources/TicTacToe/TicTacToe.swift b/Examples/SwiftIOPlayground/13MoreProjects/TicTacToe/Sources/TicTacToe/TicTacToe.swift similarity index 100% rename from Examples/SwiftIOPlayground/12MoreProjects/TicTacToe/Sources/TicTacToe/TicTacToe.swift rename to Examples/SwiftIOPlayground/13MoreProjects/TicTacToe/Sources/TicTacToe/TicTacToe.swift