diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.pbxproj b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ae86f70 --- /dev/null +++ b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.pbxproj @@ -0,0 +1,349 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + AC9F7547231E6ADA00387AF8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC9F7546231E6ADA00387AF8 /* AppDelegate.swift */; }; + AC9F7549231E6ADA00387AF8 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC9F7548231E6ADA00387AF8 /* ViewController.swift */; }; + AC9F754C231E6ADA00387AF8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AC9F754A231E6ADA00387AF8 /* Main.storyboard */; }; + AC9F754E231E6AE300387AF8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AC9F754D231E6AE300387AF8 /* Assets.xcassets */; }; + AC9F7551231E6AE300387AF8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AC9F754F231E6AE300387AF8 /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + AC9F7543231E6ADA00387AF8 /* rpi4-osdev-ioscontrol.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "rpi4-osdev-ioscontrol.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + AC9F7546231E6ADA00387AF8 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + AC9F7548231E6ADA00387AF8 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + AC9F754B231E6ADA00387AF8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + AC9F754D231E6AE300387AF8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + AC9F7550231E6AE300387AF8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + AC9F7552231E6AE300387AF8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + AC9F7540231E6ADA00387AF8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + AC9F753A231E6AD900387AF8 = { + isa = PBXGroup; + children = ( + AC9F7545231E6ADA00387AF8 /* rpi4-osdev-ioscontrol */, + AC9F7544231E6ADA00387AF8 /* Products */, + ); + sourceTree = ""; + }; + AC9F7544231E6ADA00387AF8 /* Products */ = { + isa = PBXGroup; + children = ( + AC9F7543231E6ADA00387AF8 /* rpi4-osdev-ioscontrol.app */, + ); + name = Products; + sourceTree = ""; + }; + AC9F7545231E6ADA00387AF8 /* rpi4-osdev-ioscontrol */ = { + isa = PBXGroup; + children = ( + AC9F7546231E6ADA00387AF8 /* AppDelegate.swift */, + AC9F7548231E6ADA00387AF8 /* ViewController.swift */, + AC9F754A231E6ADA00387AF8 /* Main.storyboard */, + AC9F754D231E6AE300387AF8 /* Assets.xcassets */, + AC9F754F231E6AE300387AF8 /* LaunchScreen.storyboard */, + AC9F7552231E6AE300387AF8 /* Info.plist */, + ); + path = "rpi4-osdev-ioscontrol"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + AC9F7542231E6ADA00387AF8 /* rpi4-osdev-ioscontrol */ = { + isa = PBXNativeTarget; + buildConfigurationList = AC9F7555231E6AE300387AF8 /* Build configuration list for PBXNativeTarget "rpi4-osdev-ioscontrol" */; + buildPhases = ( + AC9F753F231E6ADA00387AF8 /* Sources */, + AC9F7540231E6ADA00387AF8 /* Frameworks */, + AC9F7541231E6ADA00387AF8 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "rpi4-osdev-ioscontrol"; + productName = BLEPeripheralApp; + productReference = AC9F7543231E6ADA00387AF8 /* rpi4-osdev-ioscontrol.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + AC9F753B231E6AD900387AF8 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1020; + LastUpgradeCheck = 1240; + ORGANIZATIONNAME = isometimes; + TargetAttributes = { + AC9F7542231E6ADA00387AF8 = { + CreatedOnToolsVersion = 10.2.1; + }; + }; + }; + buildConfigurationList = AC9F753E231E6AD900387AF8 /* Build configuration list for PBXProject "rpi4-osdev-ioscontrol" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = AC9F753A231E6AD900387AF8; + productRefGroup = AC9F7544231E6ADA00387AF8 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + AC9F7542231E6ADA00387AF8 /* rpi4-osdev-ioscontrol */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + AC9F7541231E6ADA00387AF8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AC9F7551231E6AE300387AF8 /* LaunchScreen.storyboard in Resources */, + AC9F754E231E6AE300387AF8 /* Assets.xcassets in Resources */, + AC9F754C231E6ADA00387AF8 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + AC9F753F231E6ADA00387AF8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AC9F7549231E6ADA00387AF8 /* ViewController.swift in Sources */, + AC9F7547231E6ADA00387AF8 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + AC9F754A231E6ADA00387AF8 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + AC9F754B231E6ADA00387AF8 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + AC9F754F231E6AE300387AF8 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + AC9F7550231E6AE300387AF8 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + AC9F7553231E6AE300387AF8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.2; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + AC9F7554231E6AE300387AF8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.2; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + AC9F7556231E6AE300387AF8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 7L2BE98W4U; + INFOPLIST_FILE = "rpi4-osdev-ioscontrol/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.AwayPlays.BLEPeripheralApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + AC9F7557231E6AE300387AF8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 7L2BE98W4U; + INFOPLIST_FILE = "rpi4-osdev-ioscontrol/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.AwayPlays.BLEPeripheralApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + AC9F753E231E6AD900387AF8 /* Build configuration list for PBXProject "rpi4-osdev-ioscontrol" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AC9F7553231E6AE300387AF8 /* Debug */, + AC9F7554231E6AE300387AF8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + AC9F7555231E6AE300387AF8 /* Build configuration list for PBXNativeTarget "rpi4-osdev-ioscontrol" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AC9F7556231E6AE300387AF8 /* Debug */, + AC9F7557231E6AE300387AF8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = AC9F753B231E6AD900387AF8 /* Project object */; +} diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..b36c899 --- /dev/null +++ b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/xcuserdata/Akshata.xcuserdatad/UserInterfaceState.xcuserstate b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/xcuserdata/Akshata.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..cf501f0 Binary files /dev/null and b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/xcuserdata/Akshata.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/xcuserdata/agb.xcuserdatad/UserInterfaceState.xcuserstate b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/xcuserdata/agb.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..13365ee Binary files /dev/null and b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/xcuserdata/agb.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/xcuserdata/agb.xcuserdatad/WorkspaceSettings.xcsettings b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/xcuserdata/agb.xcuserdatad/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..379adbe --- /dev/null +++ b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/project.xcworkspace/xcuserdata/agb.xcuserdatad/WorkspaceSettings.xcsettings @@ -0,0 +1,18 @@ + + + + + BuildLocationStyle + UseAppPreferences + CustomBuildLocationType + RelativeToDerivedData + DerivedDataLocationStyle + Default + IssueFilterStyle + ShowActiveSchemeOnly + LiveSourceIssuesEnabled + + ShowSharedSchemesAutomaticallyEnabled + + + diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/xcuserdata/Akshata.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/xcuserdata/Akshata.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..fe2b454 --- /dev/null +++ b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/xcuserdata/Akshata.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/xcuserdata/Akshata.xcuserdatad/xcschemes/xcschememanagement.plist b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/xcuserdata/Akshata.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..b39e61e --- /dev/null +++ b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/xcuserdata/Akshata.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + BLEPeripheralApp.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/xcuserdata/agb.xcuserdatad/xcschemes/xcschememanagement.plist b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/xcuserdata/agb.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..f0aead2 --- /dev/null +++ b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol.xcodeproj/xcuserdata/agb.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,19 @@ + + + + + SchemeUserState + + BLEPeripheralApp.xcscheme_^#shared#^_ + + orderHint + 0 + + rpi4-osdev-ioscontrol.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/AppDelegate.swift b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/AppDelegate.swift new file mode 100644 index 0000000..8e9839b --- /dev/null +++ b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/AppDelegate.swift @@ -0,0 +1,37 @@ +// +// AppDelegate.swift +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } +} diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/Assets.xcassets/AppIcon.appiconset/Contents.json b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/Assets.xcassets/Contents.json b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/Base.lproj/LaunchScreen.storyboard b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..09ee174 --- /dev/null +++ b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/Base.lproj/Main.storyboard b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/Base.lproj/Main.storyboard new file mode 100644 index 0000000..cb2d4af --- /dev/null +++ b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/Base.lproj/Main.storyboard @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/Info.plist b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/Info.plist new file mode 100644 index 0000000..1adb454 --- /dev/null +++ b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + NSBluetoothAlwaysUsageDescription + Sending control information to the Raspberry Pi 4 + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/ViewController.swift b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/ViewController.swift new file mode 100644 index 0000000..5212959 --- /dev/null +++ b/part12-wgt/controller-ios/rpi4-osdev-ioscontrol/ViewController.swift @@ -0,0 +1,101 @@ +// +// ViewController.swift +// + +import UIKit +import CoreBluetooth + +class ViewController: UIViewController,CBPeripheralManagerDelegate { + @IBOutlet weak var messageLabel: UILabel! + @IBOutlet weak var fireButton: UIButton! + + private var service: CBUUID! + private var peripheralManager : CBPeripheralManager! + let myCharacteristic1 = CBMutableCharacteristic(type: CBUUID(string: "EC0E"), properties: [.notify, .write, .read], value: nil, permissions: [.readable, .writeable]) + + override func viewDidLoad() { + super.viewDidLoad() + peripheralManager = CBPeripheralManager(delegate: self, queue: nil) + } + + @IBAction func onFireUp() { + let fireup : [UInt8] = [2, 1] + + messageLabel.text = "Fired" + + var fireupData = Data() + fireupData.append(contentsOf: fireup) + + peripheralManager.updateValue(fireupData, for: myCharacteristic1, onSubscribedCentrals: nil) + } + + @IBAction func onFireDown() { + let firedown : [UInt8] = [1, 1] + + messageLabel.text = "Firing" + + var firedownData = Data() + firedownData.append(contentsOf: firedown) + + peripheralManager.updateValue(firedownData, for: myCharacteristic1, onSubscribedCentrals: nil) + } + + @IBAction func handlePan(_ gesture: UIPanGestureRecognizer) { + let screenSize: CGRect = UIScreen.main.bounds + let tap = gesture.location(in: view) + + let maxx = screenSize.width + let maxy = screenSize.height + + let realx = UInt16(((tap.x / maxx) * 320).rounded()) + let realy = UInt16(((tap.y / maxy) * 200).rounded()) + + let coords : [UInt8] = [UInt8(realx & 0x00ff), UInt8(realx >> 8 & 0x00ff), UInt8(realy & 0x00ff), UInt8(realy >> 8 & 0x00ff)] + + var coordData = Data() + coordData.append(contentsOf: coords) + + peripheralManager.updateValue(coordData, for: myCharacteristic1, onSubscribedCentrals: nil) + } + + func peripheralManagerDidUpdateState(_ peripheral: CBPeripheralManager) { + switch peripheral.state { + case .unknown: + print("Bluetooth Device is UNKNOWN") + case .unsupported: + print("Bluetooth Device is UNSUPPORTED") + case .unauthorized: + print("Bluetooth Device is UNAUTHORIZED") + case .resetting: + print("Bluetooth Device is RESETTING") + case .poweredOff: + print("Bluetooth Device is POWERED OFF") + case .poweredOn: + print("Bluetooth Device is POWERED ON") + addServices() + @unknown default: + fatalError() + } + } + + func addServices() { + service = CBUUID(string: "EC00") + let myService = CBMutableService(type: service, primary: true) + myService.characteristics = [myCharacteristic1] + peripheralManager.add(myService) + startAdvertising() + } + + func startAdvertising() { + messageLabel.text = "Waiting for subscriber" + peripheralManager.startAdvertising([CBAdvertisementDataLocalNameKey : "echo", CBAdvertisementDataServiceUUIDsKey : [service]]) + } + + func peripheralManager(_ peripheral: CBPeripheralManager, central: CBCentral, didSubscribeTo characteristic: CBCharacteristic) { + messageLabel.text = "Sub \(central.identifier.uuidString)" + } + + func peripheralManager(_ peripheral: CBPeripheralManager, central: CBCentral, didUnsubscribeFrom characteristic: CBCharacteristic) { + messageLabel.text = "Unsub \(central.identifier.uuidString)" + } +} diff --git a/part12-wgt/controller/characteristic.js b/part12-wgt/controller-node/characteristic.js similarity index 100% rename from part12-wgt/controller/characteristic.js rename to part12-wgt/controller-node/characteristic.js diff --git a/part12-wgt/controller/main.js b/part12-wgt/controller-node/main.js similarity index 100% rename from part12-wgt/controller/main.js rename to part12-wgt/controller-node/main.js diff --git a/part12-wgt/lib/bt.c b/part12-wgt/lib/bt.c index 912dd47..f68a8c1 100644 --- a/part12-wgt/lib/bt.c +++ b/part12-wgt/lib/bt.c @@ -1,3 +1,5 @@ +#define IOS_CONTROL + #include "../include/io.h" // UART0 @@ -232,7 +234,11 @@ void sendACLsubscribe(unsigned int handle) bt_writeByte(lo(channel)); bt_writeByte(hi(channel)); +#ifdef IOS_CONTROL volatile unsigned char command[5] = { 0x12, 0x3d, 0x00, 0x01, 0x00 }; +#else + volatile unsigned char command[5] = { 0x12, 0x2b, 0x00, 0x01, 0x00 }; +#endif unsigned int c=0; while (c++> 17; + s1 ^= s0; + s1 ^= s0 >> 26; + state1 = s1; + + return state0 + state1; +} + +// ######## STUB FUNCTIONS ######## + +unsigned int kb = 0; + +unsigned int kbhit(void) { + kb++; + return kb / 500; +} + +void getch(void) { + wait_msec(0x500000); + kb = 0; +} + +// ######## WGT EXAMPLES ######## + +#define SPRITES_IN_FILE 20 /* We're loading 20 sprites */ + +int i; /* Generic counter */ +color palette[256]; /* Our palette */ +block sprites[SPRITES_IN_FILE+1]; /* Pointers to sprites */ +int quit; /* if quit !=0, program quits */ + +void looper (void); /* Function to move cursor */ + +void wgt23() +{ + set_clock_rate(get_max_clock()); + mem_init(); + vga256 (); + + start_core2(minit); // Start the comms engine (core 2) + while (!comms_up); // Wait for comms up + + /* Load our sprites from the file. Palette is loaded too */ + extern unsigned char _binary_bin_mouse_spr_start[]; + wloadsprites (palette, &_binary_bin_mouse_spr_start[0], sprites, 0, SPRITES_IN_FILE); + wsetpalette (0, 255, palette); + + /* Initialize the WGT sprite system */ + initialize_sprites (sprites); + maxsprite = 1; /* number of sprites on */ + + for (i = 0; i < 200; i++) /* draw a background */ + { + wsetcolor (vgapal[i]); + wline (0, i, 159, i); + wline (160, 199 - i, 319, 199 - i); + } + + wcopyscreen (0, 0, 319, 199, NULL, 0, 0, backgroundscreen); + wcopyscreen (0, 0, 319, 199, NULL, 0, 0, spritescreen); + /* when using sprites, whatever is on the visual page must be on + spritescreen too! */ + + /* Also, you must make sure you turn a sprite on AFTER you draw + the background or it will leave a black spot where the sprite + is first shown. */ + wsetscreen (spritescreen); + spriteon (1, 160, 100, 1); /* turn on any sprites */ + + animate (1, "(1,30)(2,30)(3,30)(4,30)(3,30)(2,30)R"); + animon (1); + /* animate the sprite */ + + do { + looper (); /* Position cursor where mouse is */ + } while (!quit); + + spriteoff (1); /* turn off sprites */ + /* To be safe, turn off all sprites before ending your program. + This will free any memory used from them. */ + + deinitialize_sprites (); + mdeinit (); /* Deinitialize the mouse handler */ + wfreesprites (sprites, 0, SPRITES_IN_FILE); /* free memory */ +} + +void looper (void) +{ + erase_sprites(); /* clear the sprites */ + + s[1].x = mx; /* any direct sprite movements must be placed */ + s[1].y = my; /* between erasespr and drawspr */ + /* This will place sprite number 1 where the mouse cursor is. */ + + draw_sprites (1); /* draw them back on */ + wait_msec(0x3E9F); + if (but) + quit = 1; +} + +void main() +{ + wgt23(); + while (1); +} diff --git a/part12-wgt/samples/wgt25.c b/part12-wgt/samples/wgt25.c index 7b069a1..8781f0a 100644 --- a/part12-wgt/samples/wgt25.c +++ b/part12-wgt/samples/wgt25.c @@ -1,5 +1,6 @@ #include "include/wgtspr.h" #include "include/mem.h" +#include "include/multicore.h" // ######## REQUIRED FUNCTIONS ######## @@ -52,9 +53,14 @@ void wgt25() set_clock_rate(get_max_clock()); mem_init(); vga256 (); + + start_core2(minit); // Start the comms engine (core 2) + while (!comms_up); // Wait for comms up + extern unsigned char _binary_bin_mouse_spr_start[]; wloadsprites (palette, &_binary_bin_mouse_spr_start[0], sprites, 0, 1000); wsetpalette (0, 255, palette); + initialize_sprites (sprites); /* initialize them */ maxsprite = 4; /* number of sprites on */ @@ -98,7 +104,7 @@ void wgt25() do { looper (); - } while (1); + } while (!quit); spriteoff (1); /* turn off sprite */ spriteoff (2); /* turn off sprite */ @@ -112,13 +118,13 @@ void wgt25() void looper (void) { + int i; + erase_sprites (); /* clear the sprites */ - /* - if (kbhit ()) + if (but) { - c = toupper (getch ()); - if (c == 'Q') + if (but == 2) quit = 1; sprite_toggle = !sprite_toggle; @@ -136,8 +142,8 @@ void looper (void) moveyon (i); animon (i); } + noclick(); } - */ draw_sprites (1); /* draw them back on */ /* This loop is required to update sprite diff --git a/part12-wgt/wgt/mouse.c b/part12-wgt/wgt/mouse.c index 34907be..ff308ab 100644 --- a/part12-wgt/wgt/mouse.c +++ b/part12-wgt/wgt/mouse.c @@ -1,3 +1,5 @@ +#define IOS_CONTROL + #include "../include/wgt.h" #include "../include/multicore.h" #include "../include/io.h" @@ -173,7 +175,11 @@ void acl_poll() unsigned char opcode = data[4]; if (thandle == connection_handle && opcode == 0x1b) { +#ifdef IOS_CONTROL if (channel == 4 && data[5] == 0x3b && data[6] == 0x00) { +#else + if (channel == 4 && data[5] == 0x2a && data[6] == 0x00) { +#endif if (length == 7) msetxy(data[7] | (data[8] << 8), data[9] | (data[10] << 8)); if (length == 5) msetbut(data[7], data[8]); }