Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

My updates to the driver. See README. Minimal testing but seems to wo…

…rk for me. Good luck!

* Merged the Sourceforge and BitBucket upstreams.
* Renamed from nl.bjaelectronics.driver.PL2303 to net.sourceforge.osx-pl2303 (and
  similarly for class names). 
* Removed all the PID/VID combos I can't test. Easy to add them back if you 
  need them (just duplicate one of the current ones in Info.plist). Only
  the default (067B/2303) remains. 
* Set all the OS version minimums to 10.6 (as I can't test older versions).
* Fixed some bugs that prevented 64-bit builds working. This necessitated
  some refactoring due to unspecified pointer/integer size assumptions.
* Fixed or silenced most of the compiler warnings.
* Update distribution packager.
* Add very hackish stubs for power management methods that seem to be required
  now (otherwise you get link/undefined symbol errors when loading the kext).
  • Loading branch information...
commit 644c12f14e185c546ac1205f5b3d70633e61516f 1 parent 3a9e59d
@hugovincent authored
View
5 .gitignore
@@ -0,0 +1,5 @@
+build/**
+**.pbxuser
+**.perspectivev3
+distribution/build/**
+
View
BIN  English.lproj/InfoPlist.strings
Binary file not shown
View
607 Info.plist
@@ -1,240 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>osx-pl2303</string>
- <key>CFBundleIconFile</key>
- <string></string>
+ <key>CFBundleGetInfoString</key>
+ <string>1.0.1</string>
<key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
+ <string>net.sourceforge.osx-pl2303</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
- <string>Mac OS X Driver for PL2302 USB-to-serial bridge</string>
+ <string>osx-pl2303</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.0.0d1</string>
+ <string>1.0.1</string>
<key>IOKitPersonalities</key>
<dict>
- <key>04bb_0a03</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>2563</integer>
- <key>idVendor</key>
- <integer>1211</integer>
- </dict>
- <key>04e8_8001</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>32769</integer>
- <key>idVendor</key>
- <integer>1256</integer>
- </dict>
- <key>0547_2008</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>8200</integer>
- <key>idVendor</key>
- <integer>1351</integer>
- </dict>
- <key>0557_2008</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>8200</integer>
- <key>idVendor</key>
- <integer>1367</integer>
- </dict>
- <key>056e_5003</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>20483</integer>
- <key>idVendor</key>
- <integer>1390</integer>
- </dict>
- <key>056e_5004</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>20484</integer>
- <key>idVendor</key>
- <integer>1390</integer>
- </dict>
- <key>0584_b000</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>45056</integer>
- <key>idVendor</key>
- <integer>1412</integer>
- </dict>
- <key>05ad_0fba</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>4026</integer>
- <key>idVendor</key>
- <integer>1453</integer>
- </dict>
- <key>067b_04bb</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>1211</integer>
- <key>idVendor</key>
- <integer>1659</integer>
- </dict>
<key>067b_2303</key>
<dict>
<key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
+ <string>net.sourceforge.osx-pl2303</string>
<key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
+ <string>osx_pl2303</string>
<key>IOKitDebug</key>
<integer>0</integer>
<key>IOMatchCategory</key>
@@ -252,374 +45,6 @@
<key>idVendor</key>
<integer>1659</integer>
</dict>
- <key>067b_aaa0</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>43680</integer>
- <key>idVendor</key>
- <integer>1659</integer>
- </dict>
- <key>067b_aaa2</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>43682</integer>
- <key>idVendor</key>
- <integer>1659</integer>
- </dict>
- <key>0731_0528</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>1320</integer>
- <key>idVendor</key>
- <integer>1841</integer>
- </dict>
- <key>0745_0001</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>1</integer>
- <key>idVendor</key>
- <integer>1861</integer>
- </dict>
- <key>078b_1234</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>4660</integer>
- <key>idVendor</key>
- <integer>1931</integer>
- </dict>
- <key>0830_0080</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>128</integer>
- <key>idVendor</key>
- <integer>2096</integer>
- </dict>
- <key>0df7_0620</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>1568</integer>
- <key>idVendor</key>
- <integer>3575</integer>
- </dict>
- <key>0eba_1080</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>4224</integer>
- <key>idVendor</key>
- <integer>3770</integer>
- </dict>
- <key>11ad_0001</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>1</integer>
- <key>idVendor</key>
- <integer>4525</integer>
- </dict>
- <key>11f5_0003</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>3</integer>
- <key>idVendor</key>
- <integer>4597</integer>
- </dict>
- <key>11f7_02df</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>735</integer>
- <key>idVendor</key>
- <integer>4599</integer>
- </dict>
- <key>1453_4026</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>16422</integer>
- <key>idVendor</key>
- <integer>5203</integer>
- </dict>
- <key>19d2_fffd</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>65533</integer>
- <key>idVendor</key>
- <integer>6610</integer>
- </dict>
- <key>2303_1659</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>8963</integer>
- <key>idVendor</key>
- <integer>5721</integer>
- </dict>
- <key>2478_2008</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>8200</integer>
- <key>idVendor</key>
- <integer>9336</integer>
- </dict>
- <key>6189_2068</key>
- <dict>
- <key>CFBundleIdentifier</key>
- <string>nl.bjaelectronics.driver.PL2303</string>
- <key>IOClass</key>
- <string>nl_bjaelectronics_driver_PL2303</string>
- <key>IOKitDebug</key>
- <integer>0</integer>
- <key>IOMatchCategory</key>
- <string>ProfilicSerialUSB</string>
- <key>IOProviderClass</key>
- <string>IOUSBDevice</string>
- <key>IOResourceMatch</key>
- <string>IOKit</string>
- <key>bConfigurationValue</key>
- <integer>1</integer>
- <key>bInterfaceNumber</key>
- <integer>0</integer>
- <key>idProduct</key>
- <integer>8296</integer>
- <key>idVendor</key>
- <integer>24969</integer>
- </dict>
</dict>
<key>OSBundleLibraries</key>
<dict>
@@ -627,12 +52,16 @@
<string>1.0.4</string>
<key>com.apple.iokit.IOUSBFamily</key>
<string>1.8</string>
- <key>com.apple.kernel.iokit</key>
- <string>6.9.9</string>
- <key>com.apple.kernel.libkern</key>
- <string>6.9.9</string>
- <key>com.apple.kernel.mach</key>
- <string>6.9.9</string>
+ <key>com.apple.kpi.bsd</key>
+ <string>8.0</string>
+ <key>com.apple.kpi.iokit</key>
+ <string>8.0</string>
+ <key>com.apple.kpi.libkern</key>
+ <string>8.0</string>
+ <key>com.apple.kpi.mach</key>
+ <string>8.0</string>
+ <key>com.apple.kpi.unsupported</key>
+ <string>8.0</string>
</dict>
</dict>
</plist>
View
0  ds_pl2303HXD_v1.3.pdf → PL-2303HXD Datasheet.pdf
File renamed without changes
View
29 README
@@ -0,0 +1,29 @@
+This is a slightly updated version of the open source Prolific PL2303 USB
+to Serial driver for Mac.
+
+Users of PL2303 devices on OS X should note that the official driver
+(which can be downloaded from Prolific) seems to be rampantly buggy...
+
+Hugo Vincent, 20th October 2010.
+ http://github.com/hugovincent/osx-pl2303/
+
+Original version at
+ http://osx-pl2303.sourceforge.net/
+and
+ http://bitbucket.org/ddb/osx-pl2303/.
+
+Changes:
+* Merged the Sourceforge and BitBucket upstreams.
+* Renamed from nl.bjaelectronics.driver.PL2303 to net.sourceforge.osx-pl2303 (and
+ similarly for class names).
+* Removed all the PID/VID combos I can't test. Easy to add them back if you
+ need them (just duplicate one of the current ones in Info.plist). Only
+ the default (067B/2303) remains.
+* Set all the OS version minimums to 10.6 (as I can't test older versions).
+* Fixed some bugs that prevented 64-bit builds working. This necessitated
+ some refactoring due to unspecified pointer/integer size assumptions.
+* Fixed or silenced most of the compiler warnings.
+* Update distribution packager.
+* Add very hackish stubs for power management methods that seem to be required
+ now (otherwise you get link/undefined symbol errors when loading the kext).
+
View
BIN  distribution/osx-pl2303-10.3.9.pmproj
Binary file not shown
View
1  distribution/osx-pl2303.pmdoc/01osx-contents.xml
@@ -0,0 +1 @@
+<pkg-contents spec="1.12"><f n="osx-pl2303.kext" o="root" g="wheel" p="16877" pt="/System/Library/Extensions/osx-pl2303.kext" m="false" t="file"><f n="Contents" o="root" g="wheel" p="16877"><f n="Info.plist" o="root" g="wheel" p="33261"/><f n="MacOS" o="root" g="wheel" p="16877"><f n="osx-pl2303" o="root" g="wheel" p="33261"/></f><f n="Resources" o="root" g="wheel" p="16877"><f n="COPYING" o="root" g="wheel" p="33261"/><f n="English.lproj" o="root" g="wheel" p="16877"><f n="InfoPlist.strings" o="root" g="wheel" p="33261"/></f></f></f></f></pkg-contents>
View
1  distribution/osx-pl2303.pmdoc/01osx.xml
@@ -0,0 +1 @@
+<pkgref spec="1.12" uuid="D06076E8-63F3-428E-A910-94C6D93C6FC2"><config><identifier>net.sourceforge.osx-pl2303.pkg</identifier><version>1.0.1b</version><description/><post-install type="req-restart"/><requireAuthorization/><installFrom includeRoot="true">/System/Library/Extensions/osx-pl2303.kext</installFrom><installTo>/System/Library/Extensions</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>version</mod><mod>postInstall</mod><mod>identifier</mod><mod>parent</mod><mod>installTo</mod></config><contents><file-list>01osx-contents.xml</file-list><component id="net.sourceforge.osx-pl2303" path="/System/Library/Extensions/osx-pl2303.kext" version="1.0.1b"/><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
View
28 distribution/license.rtf → distribution/osx-pl2303.pmdoc/index.xml
@@ -1,7 +1,6 @@
-{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf330
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+<pkmkdoc spec="1.12"><properties><title>OS X PL2303 USB to Serial Driver v1.0.1</title><build>/Users/hugo/Projects/osx-pl2303/distribution/build/osx-pl2303-10.4.pkg</build><organization>net.sourceforge.osx-pl2303</organization><userSees ui="easy"/><min-target os="3"/><domain anywhere="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>PL2303 USB to Serial Driver for Mac OS X. Currently this driver only supports PL2303 devices with the default VID/PID pair (0x067b/0x2303). If you need others, download the source code and add the VID/PID in Info.plist. </description><contents><choice title="osx-pl2303" id="choice1" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.osx-pl2303.pkg"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"><resource mime-type="text/rtf" kind="embedded" type="license"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
-\paperw11900\paperh16840\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
\f0\fs24 \cf0 GNU GENERAL PUBLIC LICENSE\
@@ -284,5 +283,24 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\
POSSIBILITY OF SUCH DAMAGES.\
\
END OF TERMS AND CONDITIONS\
-\page \
-}
+}]]></resource><resource mime-type="text/rtf" kind="embedded" type="welcome"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fmodern\fcharset0 Courier;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
+
+\f0\fs24 \cf0 Welcome to the OS X PL2303 USB to Serial driver installation program. You will be guided through the steps to install this software.\
+\
+Imported Uninstall information:\
+Removing the driver must be done manually. Perform the following steps to remove the driver. Open a terminal and run the following commands:\
+\
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
+
+\f1\fs20 \cf0 sudo kextunload /System/Library/Extensions/osx-pl2303.kext/ \
+sudo rm -r /System/Library/Extensions/osx-pl2303.kext/\
+sudo rm -r /Library/Receipts/osx-pl2303.pkg/
+\fs22 \
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
+
+\f0\fs24 \cf0 \
+The driver should now be uninstalled.\
+}]]></resource></locale></resources><flags/><extra-files/><item type="file">01osx.xml</item><mod>properties.title</mod><mod>properties.customizeOption</mod><mod>description</mod><mod>extraFiles</mod></pkmkdoc>
View
BIN  distribution/osx-pl2303.pmproj
Binary file not shown
View
19 distribution/welcome.rtf
@@ -1,19 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
-{\colortbl;\red255\green255\blue255;}
-\paperw11900\paperh16840\margl1440\margr1440\vieww9000\viewh8400\viewkind0
-\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
-
-\f0\fs24 \cf0 Welcome to the OS X PL2303 USB to Serial driver Installation Program. You will be guided through the steps to install this software.\
-\
-Imported Uninstall information:\
-PackageMaker does not support uninstall! Removing the driver can be done manually. Execute the following steps to remove the driver:\
--open a terminal\
--type: kextunload /System/Library/Extensions/osx-pl2303.kext/\
--The command prompt asks for your administrator password\
--type: sudo rm -r /System/Library/Extensions/osx-pl2303.kext/\
--The command prompt asks for your administrator password\
--type: sudo rm -r /Library/Receipts/osx-pl2303.pkg/\
-\
-The driver should be uninstalled.\
-}
View
10 load.sh 100644 → 100755
@@ -1,8 +1,8 @@
#!/bin/sh
-cp -r ./build/Release-10.4-universal/osx-pl2303.kext /tmp
-cd /tmp
+cp -R ./build/Release/osx-pl2303.kext /System/Library/Extensions
+cd /System/Library/Extensions
+chown -R root:wheel osx-pl2303.kext
+chmod -R 755 osx-pl2303.kext
+kextcache -e
kextload osx-pl2303.kext
-#/Users/Jeroen/Projects/Xcode/SerialTest/build/Release/SerialTest
-#avrdude -p m128 -c avrisp2 -P /dev/tty.PL2303-151
-#kextunload osx-pl2303.kext
View
338 osx-pl2303.xcodeproj/project.pbxproj
@@ -7,41 +7,17 @@
objects = {
/* Begin PBXBuildFile section */
- 32D94FC60562CBF700B6AF17 /* osx_pl2303.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A224C3EFF42367911CA2CB7 /* osx_pl2303.h */; };
- 32D94FC80562CBF700B6AF17 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
32D94FCA0562CBF700B6AF17 /* osx_pl2303.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A224C3FFF42367911CA2CB7 /* osx_pl2303.cpp */; settings = {ATTRIBUTES = (); }; };
- 9056EE680A3AF19000901FF8 /* osx_pl2303.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A224C3FFF42367911CA2CB7 /* osx_pl2303.cpp */; };
- 9056EE6C0A3AF1AA00901FF8 /* osx_pl2303.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A224C3EFF42367911CA2CB7 /* osx_pl2303.h */; };
- 9056EE6D0A3AF1C000901FF8 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
- 9056EE6E0A3AF1C500901FF8 /* COPYING in Resources */ = {isa = PBXBuildFile; fileRef = 906D8A5709AF0FBC00CAB1B1 /* COPYING */; };
- 906D8A5809AF0FBC00CAB1B1 /* COPYING in Resources */ = {isa = PBXBuildFile; fileRef = 906D8A5709AF0FBC00CAB1B1 /* COPYING */; };
/* End PBXBuildFile section */
-/* Begin PBXBuildStyle section */
- 06AA1265FFB2107B11CA28AA /* Debug */ = {
- isa = PBXBuildStyle;
- buildSettings = {
- };
- name = Debug;
- };
- 06AA1266FFB2107B11CA28AA /* Release */ = {
- isa = PBXBuildStyle;
- buildSettings = {
- };
- name = Release;
- };
-/* End PBXBuildStyle section */
-
/* Begin PBXFileReference section */
089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1A224C3EFF42367911CA2CB7 /* osx_pl2303.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = osx_pl2303.h; sourceTree = "<group>"; };
1A224C3FFF42367911CA2CB7 /* osx_pl2303.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = osx_pl2303.cpp; sourceTree = "<group>"; };
- 32D94FCF0562CBF700B6AF17 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; };
+ 32D94FCF0562CBF700B6AF17 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
32D94FD00562CBF700B6AF17 /* osx-pl2303.kext */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "osx-pl2303.kext"; sourceTree = BUILT_PRODUCTS_DIR; };
- 8DA8362C06AD9B9200E5AC22 /* Kernel.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kernel.framework; path = /System/Library/Frameworks/Kernel.framework; sourceTree = "<absolute>"; };
906D8A5709AF0FBC00CAB1B1 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = COPYING; sourceTree = "<group>"; };
- 90FB12BF0A3AE7D200C1B579 /* release-osx-10.3.x.kext */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "release-osx-10.3.x.kext"; sourceTree = BUILT_PRODUCTS_DIR; };
- 90FB12C00A3AE7D200C1B579 /* release-osx-10.3.x-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "release-osx-10.3.x-Info.plist"; sourceTree = "<group>"; };
+ 9ACEA5BC126E6EBD003CB4FE /* Kernel.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kernel.framework; path = /System/Library/Frameworks/Kernel.framework; sourceTree = "<absolute>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -52,44 +28,26 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- 90FB12BD0A3AE7D200C1B579 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
089C166AFE841209C02AAC07 /* osx-pl2303 */ = {
isa = PBXGroup;
children = (
- 9086EC3309DB19BE00297DF4 /* external */,
906D8A5709AF0FBC00CAB1B1 /* COPYING */,
+ 32D94FCF0562CBF700B6AF17 /* Info.plist */,
+ 089C167DFE841241C02AAC07 /* InfoPlist.strings */,
247142CAFF3F8F9811CA285C /* Source */,
- 8DA8362C06AD9B9200E5AC22 /* Kernel.framework */,
- 089C167CFE841241C02AAC07 /* Resources */,
19C28FB6FE9D52B211CA2CBB /* Products */,
- 90FB12C00A3AE7D200C1B579 /* release-osx-10.3.x-Info.plist */,
+ 9ACEA5BC126E6EBD003CB4FE /* Kernel.framework */,
);
name = "osx-pl2303";
sourceTree = "<group>";
};
- 089C167CFE841241C02AAC07 /* Resources */ = {
- isa = PBXGroup;
- children = (
- 32D94FCF0562CBF700B6AF17 /* Info.plist */,
- 089C167DFE841241C02AAC07 /* InfoPlist.strings */,
- );
- name = Resources;
- sourceTree = "<group>";
- };
19C28FB6FE9D52B211CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
32D94FD00562CBF700B6AF17 /* osx-pl2303.kext */,
- 90FB12BF0A3AE7D200C1B579 /* release-osx-10.3.x.kext */,
);
name = Products;
sourceTree = "<group>";
@@ -103,131 +61,41 @@
name = Source;
sourceTree = "<group>";
};
- 9086EC3309DB19BE00297DF4 /* external */ = {
- isa = PBXGroup;
- children = (
- );
- name = external;
- sourceTree = "<group>";
- };
/* End PBXGroup section */
-/* Begin PBXHeadersBuildPhase section */
- 32D94FC50562CBF700B6AF17 /* Headers */ = {
- isa = PBXHeadersBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 32D94FC60562CBF700B6AF17 /* osx_pl2303.h in Headers */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 9056EE6A0A3AF1A200901FF8 /* Headers */ = {
- isa = PBXHeadersBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 9056EE6C0A3AF1AA00901FF8 /* osx_pl2303.h in Headers */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXHeadersBuildPhase section */
-
/* Begin PBXNativeTarget section */
- 32D94FC30562CBF700B6AF17 /* osx-pl2303-10.4-universal */ = {
+ 32D94FC30562CBF700B6AF17 /* osx-pl2303 */ = {
isa = PBXNativeTarget;
- buildConfigurationList = 1DEB91D908733DB10010E9CD /* Build configuration list for PBXNativeTarget "osx-pl2303-10.4-universal" */;
+ buildConfigurationList = 1DEB91D908733DB10010E9CD /* Build configuration list for PBXNativeTarget "osx-pl2303" */;
buildPhases = (
- 32D94FC50562CBF700B6AF17 /* Headers */,
- 32D94FC70562CBF700B6AF17 /* Resources */,
+ 9ACEA5F1126E72D0003CB4FE /* ShellScript */,
32D94FC90562CBF700B6AF17 /* Sources */,
+ 32D94FC70562CBF700B6AF17 /* Resources */,
32D94FCB0562CBF700B6AF17 /* Frameworks */,
- 32D94FCC0562CBF700B6AF17 /* Rez */,
);
buildRules = (
);
- buildSettings = {
- };
dependencies = (
);
- name = "osx-pl2303-10.4-universal";
+ name = "osx-pl2303";
productInstallPath = "$(SYSTEM_LIBRARY_DIR)/Extensions";
productName = "osx-pl2303";
productReference = 32D94FD00562CBF700B6AF17 /* osx-pl2303.kext */;
productType = "com.apple.product-type.kernel-extension.iokit";
};
- 90FB12BE0A3AE7D200C1B579 /* osx-pl2303-10.3.9 */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 90FB12C10A3AE7D300C1B579 /* Build configuration list for PBXNativeTarget "osx-pl2303-10.3.9" */;
- buildPhases = (
- 9056EE6A0A3AF1A200901FF8 /* Headers */,
- 90FB12BC0A3AE7D200C1B579 /* Resources */,
- 90FB12BB0A3AE7D200C1B579 /* Sources */,
- 90FB12BD0A3AE7D200C1B579 /* Frameworks */,
- 9056EE6F0A3AF1D900901FF8 /* Rez */,
- );
- buildRules = (
- );
- buildSettings = {
- GCC_ENABLE_FIX_AND_CONTINUE = YES;
- GCC_MODEL_TUNING = G5;
- INFOPLIST_FILE = "release-osx-10.3.x-Info.plist";
- INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Extensions";
- MODULE_NAME = com.yourcompany.driver.release_osx_10_3_x;
- MODULE_VERSION = 1.0.0d1;
- PREBINDING = NO;
- PRODUCT_NAME = "release-osx-10.3.x";
- WRAPPER_EXTENSION = kext;
- ZERO_LINK = YES;
- };
- dependencies = (
- );
- name = "osx-pl2303-10.3.9";
- productName = "release-osx-10.3.x";
- productReference = 90FB12BF0A3AE7D200C1B579 /* release-osx-10.3.x.kext */;
- productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIdentifier</key>
- <string>com.yourcompany.driver.release-osx-10.3.x</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundlePackageType</key>
- <string>KEXT</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1.0.0d1</string>
- <key>IOKitPersonalities</key>
- <dict/>
- <key>OSBundleLibraries</key>
- <dict/>
-</dict>
-</plist>
-";
- productType = "com.apple.product-type.kernel-extension.iokit";
- };
/* End PBXNativeTarget section */
/* Begin PBXProject section */
089C1669FE841209C02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB91DD08733DB10010E9CD /* Build configuration list for PBXProject "osx-pl2303" */;
- buildSettings = {
- };
- buildStyles = (
- 06AA1265FFB2107B11CA28AA /* Debug */,
- 06AA1266FFB2107B11CA28AA /* Release */,
- );
+ compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
mainGroup = 089C166AFE841209C02AAC07 /* osx-pl2303 */;
projectDirPath = "";
+ projectRoot = "";
targets = (
- 32D94FC30562CBF700B6AF17 /* osx-pl2303-10.4-universal */,
- 90FB12BE0A3AE7D200C1B579 /* osx-pl2303-10.3.9 */,
+ 32D94FC30562CBF700B6AF17 /* osx-pl2303 */,
);
};
/* End PBXProject section */
@@ -237,38 +105,26 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 32D94FC80562CBF700B6AF17 /* InfoPlist.strings in Resources */,
- 906D8A5809AF0FBC00CAB1B1 /* COPYING in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 90FB12BC0A3AE7D200C1B579 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 9056EE6E0A3AF1C500901FF8 /* COPYING in Resources */,
- 9056EE6D0A3AF1C000901FF8 /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
-/* Begin PBXRezBuildPhase section */
- 32D94FCC0562CBF700B6AF17 /* Rez */ = {
- isa = PBXRezBuildPhase;
+/* Begin PBXShellScriptBuildPhase section */
+ 9ACEA5F1126E72D0003CB4FE /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
- runOnlyForDeploymentPostprocessing = 0;
- };
- 9056EE6F0A3AF1D900901FF8 /* Rez */ = {
- isa = PBXRezBuildPhase;
- buildActionMask = 2147483647;
- files = (
+ inputPaths = (
+ );
+ outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "";
};
-/* End PBXRezBuildPhase section */
+/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
32D94FC90562CBF700B6AF17 /* Sources */ = {
@@ -279,14 +135,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- 90FB12BB0A3AE7D200C1B579 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 9056EE680A3AF19000901FF8 /* osx_pl2303.cpp in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
@@ -320,165 +168,71 @@
};
name = Debug;
};
- 1DEB91DB08733DB10010E9CD /* Release-10.4-universal */ = {
+ 1DEB91DB08733DB10010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = (
- ppc,
- i386,
- );
- CURRENT_PROJECT_VERSION = 1.0.0d1;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1 = x86_64;
+ CURRENT_PROJECT_VERSION = 1.0.1;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_MODEL_TUNING = G5;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Extensions";
- MODULE_NAME = com.yourcompany.driver.osx_pl2303;
- MODULE_VERSION = 1.0.0d1;
+ MODULE_NAME = "net.sourceforge.osx-pl2303";
+ MODULE_VERSION = 1.0.1;
PRODUCT_NAME = "osx-pl2303";
WRAPPER_EXTENSION = kext;
};
- name = "Release-10.4-universal";
+ name = Release;
};
1DEB91DE08733DB10010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.4;
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
+ ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH_64)";
PREBINDING = NO;
- SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
+ VALID_ARCHS = "i386 x86_64";
};
name = Debug;
};
- 1DEB91DF08733DB10010E9CD /* Release-10.4-universal */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.4;
- PREBINDING = NO;
- SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
- };
- name = "Release-10.4-universal";
- };
- 90FB12C20A3AE7D300C1B579 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_ENABLE_FIX_AND_CONTINUE = YES;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
- GCC_MODEL_TUNING = G5;
- GCC_OPTIMIZATION_LEVEL = 0;
- INFOPLIST_FILE = "release-osx-10.3.x-Info.plist";
- INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Extensions";
- MODULE_NAME = com.yourcompany.driver.release_osx_10_3_x;
- MODULE_VERSION = 1.0.0d1;
- PREBINDING = NO;
- PRODUCT_NAME = "release-osx-10.3.x";
- WRAPPER_EXTENSION = kext;
- ZERO_LINK = YES;
- };
- name = Debug;
- };
- 90FB12C30A3AE7D300C1B579 /* Release-10.4-universal */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- COPY_PHASE_STRIP = YES;
- GCC_ENABLE_FIX_AND_CONTINUE = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
- GCC_MODEL_TUNING = G5;
- INFOPLIST_FILE = "release-osx-10.3.x-Info.plist";
- INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Extensions";
- MODULE_NAME = com.yourcompany.driver.release_osx_10_3_x;
- MODULE_VERSION = 1.0.0d1;
- PREBINDING = NO;
- PRODUCT_NAME = "release-osx-10.3.x";
- WRAPPER_EXTENSION = kext;
- ZERO_LINK = NO;
- };
- name = "Release-10.4-universal";
- };
- 90FB12C70A3AE90D00C1B579 /* Release-10.3.9 */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = (
- ppc,
- i386,
- );
- CURRENT_PROJECT_VERSION = 1.0.0d1;
- GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
- GCC_MODEL_TUNING = G5;
- INFOPLIST_FILE = Info.plist;
- INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Extensions";
- MODULE_NAME = com.yourcompany.driver.osx_pl2303;
- MODULE_VERSION = 1.0.0d1;
- PRODUCT_NAME = "osx-pl2303";
- WRAPPER_EXTENSION = kext;
- };
- name = "Release-10.3.9";
- };
- 90FB12C80A3AE90D00C1B579 /* Release-10.3.9 */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- COPY_PHASE_STRIP = YES;
- GCC_ENABLE_FIX_AND_CONTINUE = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
- GCC_MODEL_TUNING = G5;
- INFOPLIST_FILE = "release-osx-10.3.x-Info.plist";
- INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Extensions";
- MODULE_NAME = com.yourcompany.driver.release_osx_10_3_x;
- MODULE_VERSION = 1.0.0d1;
- PREBINDING = NO;
- PRODUCT_NAME = "release-osx-10.3.x";
- WRAPPER_EXTENSION = kext;
- ZERO_LINK = NO;
- };
- name = "Release-10.3.9";
- };
- 90FB12C90A3AE90D00C1B579 /* Release-10.3.9 */ = {
+ 1DEB91DF08733DB10010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.3;
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
+ ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH_64)";
PREBINDING = NO;
- SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
+ VALID_ARCHS = "i386 x86_64";
};
- name = "Release-10.3.9";
+ name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
- 1DEB91D908733DB10010E9CD /* Build configuration list for PBXNativeTarget "osx-pl2303-10.4-universal" */ = {
+ 1DEB91D908733DB10010E9CD /* Build configuration list for PBXNativeTarget "osx-pl2303" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB91DA08733DB10010E9CD /* Debug */,
- 1DEB91DB08733DB10010E9CD /* Release-10.4-universal */,
- 90FB12C70A3AE90D00C1B579 /* Release-10.3.9 */,
+ 1DEB91DB08733DB10010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
- defaultConfigurationName = "Release-10.4-universal";
+ defaultConfigurationName = Release;
};
1DEB91DD08733DB10010E9CD /* Build configuration list for PBXProject "osx-pl2303" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB91DE08733DB10010E9CD /* Debug */,
- 1DEB91DF08733DB10010E9CD /* Release-10.4-universal */,
- 90FB12C90A3AE90D00C1B579 /* Release-10.3.9 */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = "Release-10.4-universal";
- };
- 90FB12C10A3AE7D300C1B579 /* Build configuration list for PBXNativeTarget "osx-pl2303-10.3.9" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 90FB12C20A3AE7D300C1B579 /* Debug */,
- 90FB12C30A3AE7D300C1B579 /* Release-10.4-universal */,
- 90FB12C80A3AE90D00C1B579 /* Release-10.3.9 */,
+ 1DEB91DF08733DB10010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
- defaultConfigurationName = "Release-10.4-universal";
+ defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
View
497 osx_pl2303.cpp
@@ -2,6 +2,7 @@
* osx_pl2303.cpp Prolific PL2303 USB to serial adaptor driver for OS X
*
* Copyright (c) 2006 BJA Electronics, Jeroen Arnoldus (opensource@bja-electronics.nl)
+ * Some changes by Hugo Vincent, October 2010.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -75,10 +76,12 @@ extern "C" {
#define DATA_IOLog(args...)
#endif
+// User notifications from kernel drivers are deprecated on Snow Leopard.
+//#define Use_KUNC 1
#define super IOSerialDriverSync
-OSDefineMetaClassAndStructors(nl_bjaelectronics_driver_PL2303, IOSerialDriverSync)
+OSDefineMetaClassAndStructors(osx_pl2303, IOSerialDriverSync)
/****************************************************************************************************/
@@ -102,20 +105,20 @@ static UInt8 Asciify(UInt8 i)
}/* end Asciify */
-bool nl_bjaelectronics_driver_PL2303::init(OSDictionary *dict)
+bool osx_pl2303::init(OSDictionary *dict)
{
bool res = super::init(dict);
DEBUG_IOLog(4,"%s(%p)::Initializing\n", getName(), this);
return res;
}
-void nl_bjaelectronics_driver_PL2303::free(void)
+void osx_pl2303::free(void)
{
DEBUG_IOLog(4,"%s(%p)::Freeing\n", getName(), this);
super::free();
}
-IOService *nl_bjaelectronics_driver_PL2303::probe(IOService *provider, SInt32 *score)
+IOService *osx_pl2303::probe(IOService *provider, SInt32 *score)
{
IOUSBDevice *Provider;
DEBUG_IOLog(4,",%s(%p)::Probe\n", getName(), this);
@@ -129,8 +132,27 @@ IOService *nl_bjaelectronics_driver_PL2303::probe(IOService *provider, SInt32 *s
return res;
}
+bool osx_pl2303::failure(IOService *provider) {
+ if (fNub)
+ {
+ destroyNub();
+ }
+ if (fCommandGate)
+ {
+ fCommandGate->release();
+ fCommandGate = NULL;
+ }
+ if (fWorkLoop)
+ {
+ fWorkLoop->release();
+ fWorkLoop = NULL;
+ }
+ DEBUG_IOLog(1,"%s(%p)::start - failed\n", getName(), this);
+ stop( provider );
+ return false;
+}
-bool nl_bjaelectronics_driver_PL2303::start(IOService *provider)
+bool osx_pl2303::start(IOService *provider)
{
enum pl2303_type type = type_1;
@@ -156,10 +178,12 @@ bool nl_bjaelectronics_driver_PL2303::start(IOService *provider)
DEBUG_IOLog(4,"%s(%p)::start PL2303 Driver\n", getName(), this);
+ OSNumber *release;
+
if( !super::start( provider ) )
{
IOLog("%s(%p)::start - super failed\n", getName(), this);
- goto Fail;
+ return failure(provider);
}
fpDevice = OSDynamicCast(IOUSBDevice, provider);
@@ -167,31 +191,32 @@ bool nl_bjaelectronics_driver_PL2303::start(IOService *provider)
if(!fpDevice)
{
IOLog("%s(%p)::start - Provider isn't a USB device!!!\n", getName(), this);
- goto Fail;
+ return failure(provider);
}
if (fpDevice->GetNumConfigurations() < 1)
{
IOLog("%s(%p)::start - no composite configurations\n", getName(), this);
- goto Fail;
+ return failure(provider);
}
// make our nub (and fPort) now
- if( !createNub() ) goto Fail;
-
+ if( !createNub() ) return failure(provider);
+
// Now configure it (leaves device suspended)
- if( !configureDevice( fpDevice->GetNumConfigurations() ) ) goto Fail;
+ if( !configureDevice( fpDevice->GetNumConfigurations() ) ) return failure(provider);
+
// Finally create the bsd tty (serial stream) and leave it there until usb stop
- if( !createSerialStream() ) goto Fail;
+ if( !createSerialStream() ) return failure(provider);
fWorkLoop = getWorkLoop();
if (!fWorkLoop)
{
IOLog("%s(%p)::start - getWorkLoop failed\n", getName(), this);
- goto Fail;
+ return failure(provider);
}
fWorkLoop->retain();
@@ -200,18 +225,18 @@ bool nl_bjaelectronics_driver_PL2303::start(IOService *provider)
if (!fCommandGate)
{
IOLog("%s(%p)::start - create commandGate failed\n", getName(), this);
- goto Fail;
+ return failure(provider);
}
if (fWorkLoop->addEventSource(fCommandGate) != kIOReturnSuccess)
{
IOLog("%s(%p)::start - addEventSource fCommandGate to WorkLoop failed\n", getName(), this);
- goto Fail;
+ return failure(provider);
}
fCommandGate->enable();
- OSNumber * release = (OSNumber *) fpDevice->getProperty(kUSBDeviceReleaseNumber);
+ release = (OSNumber *) fpDevice->getProperty(kUSBDeviceReleaseNumber);
DEBUG_IOLog(1,"%s(%p)::start - Get device version: %p \n", getName(), this, release->unsigned16BitValue() );
@@ -238,37 +263,14 @@ bool nl_bjaelectronics_driver_PL2303::start(IOService *provider)
fUSBStarted = true;
DEBUG_IOLog(3,"%s(%p)::start - Allocate resources \n", getName(), this);
-
-
-
return true;
-
-Fail:
- if (fNub)
- {
- destroyNub();
- }
- if (fCommandGate)
- {
- fCommandGate->release();
- fCommandGate = NULL;
- }
- if (fWorkLoop)
- {
- fWorkLoop->release();
- fWorkLoop = NULL;
- }
- DEBUG_IOLog(1,"%s(%p)::start - failed\n", getName(), this);
- stop( provider );
- return false;
-
}
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::stop
+// Method: osx_pl2303::stop
//
// Inputs: provider - my provider
//
@@ -278,7 +280,7 @@ bool nl_bjaelectronics_driver_PL2303::start(IOService *provider)
//
/****************************************************************************************************/
-void nl_bjaelectronics_driver_PL2303::stop( IOService *provider )
+void osx_pl2303::stop( IOService *provider )
{
@@ -322,7 +324,7 @@ void nl_bjaelectronics_driver_PL2303::stop( IOService *provider )
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::getWorkLoop
+// Method: osx_pl2303::getWorkLoop
//
// Inputs:
//
@@ -331,7 +333,7 @@ void nl_bjaelectronics_driver_PL2303::stop( IOService *provider )
// Desc: create our own workloop if we don't have one already.
//
/****************************************************************************************************/
-IOWorkLoop* nl_bjaelectronics_driver_PL2303::getWorkLoop() const
+IOWorkLoop* osx_pl2303::getWorkLoop() const
{
IOWorkLoop *w;
DEBUG_IOLog(4,"%s(%p)::getWorkLoop\n", getName(), this);
@@ -345,7 +347,7 @@ IOWorkLoop* nl_bjaelectronics_driver_PL2303::getWorkLoop() const
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::privateWatchState
+// Method: osx_pl2303::privateWatchState
//
// Inputs: port - the specified port, state - state watching for, mask - state mask (the specific bits)
//
@@ -360,7 +362,7 @@ IOWorkLoop* nl_bjaelectronics_driver_PL2303::getWorkLoop() const
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::privateWatchState( PortInfo_t *port, UInt32 *state, UInt32 mask )
+IOReturn osx_pl2303::privateWatchState( PortInfo_t *port, UInt32 *state, UInt32 mask )
{
unsigned watchState, foundStates;
bool autoActiveBit = false;
@@ -440,7 +442,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::privateWatchState( PortInfo_t *port, U
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::allocateResources
+// Method: osx_pl2303::allocateResources
//
// Inputs:
//
@@ -450,7 +452,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::privateWatchState( PortInfo_t *port, U
//
/****************************************************************************************************/
-bool nl_bjaelectronics_driver_PL2303::allocateResources( void )
+bool osx_pl2303::allocateResources( void )
{
IOUSBFindEndpointRequest epReq; // endPoint request struct on stack
bool goodCall; // return flag fm Interface call
@@ -567,7 +569,7 @@ bool nl_bjaelectronics_driver_PL2303::allocateResources( void )
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::releaseResources
+// Method: osx_pl2303::releaseResources
//
// Inputs: port - the Port
//
@@ -577,9 +579,9 @@ bool nl_bjaelectronics_driver_PL2303::allocateResources( void )
//
/****************************************************************************************************/
-void nl_bjaelectronics_driver_PL2303::releaseResources( void )
+void osx_pl2303::releaseResources( void )
{
- DEBUG_IOLog(4,"nl_bjaelectronics_driver_PL2303::releaseResources\n");
+ DEBUG_IOLog(4,"osx_pl2303::releaseResources\n");
if ( fpInterface ) {
fpInterface->close( this );
@@ -612,7 +614,7 @@ void nl_bjaelectronics_driver_PL2303::releaseResources( void )
// assumes createSerialStream is called once at usb start time
// calls allocateResources to open endpoints
//
-bool nl_bjaelectronics_driver_PL2303::startSerial()
+bool osx_pl2303::startSerial()
{
IOUSBDevRequest request;
char * buf;
@@ -712,7 +714,7 @@ bool nl_bjaelectronics_driver_PL2303::startSerial()
return false;
}
-void nl_bjaelectronics_driver_PL2303::stopSerial( bool resetDevice )
+void osx_pl2303::stopSerial( bool resetDevice )
{
DEBUG_IOLog(1,"%s(%p)::stopSerial\n", getName(), this);
@@ -733,7 +735,7 @@ void nl_bjaelectronics_driver_PL2303::stopSerial( bool resetDevice )
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::CheckSerialState
+// Method: osx_pl2303::CheckSerialState
//
// Inputs: open session count (fSessions)
// usb start/stop (fStartStopUSB) -- replace with fTerminate?
@@ -744,7 +746,7 @@ void nl_bjaelectronics_driver_PL2303::stopSerial( bool resetDevice )
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::CheckSerialState( void )
+IOReturn osx_pl2303::CheckSerialState( void )
{
Boolean newState = fUSBStarted & // usb must have started, and
// (fPowerState == kIrDAPowerOnState) & // powered on by the power manager, and
@@ -776,7 +778,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::CheckSerialState( void )
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::configureDevice
+// Method: osx_pl2303::configureDevice
//
// Inputs: numconfigs - number of configurations present
//
@@ -786,7 +788,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::CheckSerialState( void )
//
/****************************************************************************************************/
-bool nl_bjaelectronics_driver_PL2303::configureDevice( UInt8 numConfigs )
+bool osx_pl2303::configureDevice( UInt8 numConfigs )
{
IOUSBFindInterfaceRequest req; // device request Class on stack
const IOUSBConfigurationDescriptor *cd = NULL; // configuration descriptor
@@ -882,7 +884,7 @@ bool nl_bjaelectronics_driver_PL2303::configureDevice( UInt8 numConfigs )
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::createNub
+// Method: osx_pl2303::createNub
//
// Inputs:
//
@@ -892,7 +894,7 @@ bool nl_bjaelectronics_driver_PL2303::configureDevice( UInt8 numConfigs )
// create serial stream finishes the job later.
//
/****************************************************************************************************/
-bool nl_bjaelectronics_driver_PL2303::createNub(void)
+bool osx_pl2303::createNub(void)
{
DEBUG_IOLog(4,"%s(%p)::createNub\n", getName(), this);
@@ -922,7 +924,7 @@ bool nl_bjaelectronics_driver_PL2303::createNub(void)
return false;
}
-void nl_bjaelectronics_driver_PL2303::destroyNub()
+void osx_pl2303::destroyNub()
{
DEBUG_IOLog(4,"%s(%p)::destroyNub Try to destroy nub\n", getName(), this);
if (fPort != NULL) {
@@ -942,7 +944,7 @@ void nl_bjaelectronics_driver_PL2303::destroyNub()
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::createSuffix
+// Method: osx_pl2303::createSuffix
//
// Inputs: None
//
@@ -957,7 +959,7 @@ void nl_bjaelectronics_driver_PL2303::destroyNub()
//
/****************************************************************************************************/
-bool nl_bjaelectronics_driver_PL2303::createSuffix( unsigned char *sufKey )
+bool osx_pl2303::createSuffix( unsigned char *sufKey )
{
IOReturn rc;
@@ -984,7 +986,7 @@ bool nl_bjaelectronics_driver_PL2303::createSuffix( unsigned char *sufKey )
if ( (strlen((char *)&serBuf) < 9) && (strlen((char *)&serBuf) > 0) )
{
- strcpy( (char *)sufKey, (const char *)&serBuf);
+ strncpy( (char *)sufKey, (const char *)&serBuf, strlen((const char *)&serBuf) );
keyOK = true;
}
} else {
@@ -1027,7 +1029,7 @@ bool nl_bjaelectronics_driver_PL2303::createSuffix( unsigned char *sufKey )
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::SetStructureDefaults
+// Method: osx_pl2303::SetStructureDefaults
//
// Inputs: port - the port to set the defaults, Init - Probe time or not
//
@@ -1037,7 +1039,7 @@ bool nl_bjaelectronics_driver_PL2303::createSuffix( unsigned char *sufKey )
//
/****************************************************************************************************/
-void nl_bjaelectronics_driver_PL2303::SetStructureDefaults( PortInfo_t *port, bool Init )
+void osx_pl2303::SetStructureDefaults( PortInfo_t *port, bool Init )
{
UInt32 tmp;
@@ -1100,7 +1102,7 @@ void nl_bjaelectronics_driver_PL2303::SetStructureDefaults( PortInfo_t *port, bo
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::createSerialStream
+// Method: osx_pl2303::createSerialStream
//
// Inputs: None
//
@@ -1110,7 +1112,7 @@ void nl_bjaelectronics_driver_PL2303::SetStructureDefaults( PortInfo_t *port, bo
//
/****************************************************************************************************/
-bool nl_bjaelectronics_driver_PL2303::createSerialStream()
+bool osx_pl2303::createSerialStream()
{
UInt8 indx;
IOReturn rc;
@@ -1162,7 +1164,7 @@ bool nl_bjaelectronics_driver_PL2303::createSerialStream()
DEBUG_IOLog(4,"%s(%p)::createSerialStream product name: %s\n", getName(), this, fProductName);
if ( strlen((char *)fProductName) == 0 ) // believe it or not this sometimes happens (null string with an index defined???)
{
- strcpy( (char *)fProductName, defaultName);
+ strncpy( (char *)fProductName, defaultName, strlen(defaultName) );
}
fNub->setProperty( (const char *)propertyTag, (const char *)fProductName );
}
@@ -1179,7 +1181,7 @@ bool nl_bjaelectronics_driver_PL2303::createSerialStream()
// release things created in createSerialStream
//
void
-nl_bjaelectronics_driver_PL2303::destroySerialStream(void)
+osx_pl2303::destroySerialStream(void)
{
DEBUG_IOLog(4,"%s(%p)::destroySerialStream\n", getName(), this);
if( !fPort ) goto Fail;
@@ -1209,7 +1211,7 @@ nl_bjaelectronics_driver_PL2303::destroySerialStream(void)
//
// start reading on the pipes
//
-bool nl_bjaelectronics_driver_PL2303::startPipes( void )
+bool osx_pl2303::startPipes( void )
{
IOReturn rtn;
DEBUG_IOLog(4,"%s(%p)::startPipes\n", getName(), this);
@@ -1245,7 +1247,7 @@ bool nl_bjaelectronics_driver_PL2303::startPipes( void )
//
// stop i/o on the pipes
//
-void nl_bjaelectronics_driver_PL2303::stopPipes()
+void osx_pl2303::stopPipes()
{
DEBUG_IOLog(4,"%s(%p)::Stopping\n", getName(), this);
if (fpInterruptPipe){
@@ -1270,7 +1272,7 @@ void nl_bjaelectronics_driver_PL2303::stopPipes()
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::message
+// Method: osx_pl2303::message
//
// Inputs: type - message type, provider - my provider, argument - additional parameters
//
@@ -1284,7 +1286,7 @@ enum { // messageType for the callback routines
kIrDACallBack_Unplug = 0x1001 // USB Device is unplugged
};
-IOReturn nl_bjaelectronics_driver_PL2303::message( UInt32 type, IOService *provider, void *argument)
+IOReturn osx_pl2303::message( UInt32 type, IOService *provider, void *argument)
{
IOReturn err = kIOReturnSuccess;
DEBUG_IOLog(4,"%s(%p)::message %p\n", getName(), this, type);
@@ -1305,15 +1307,17 @@ IOReturn err = kIOReturnSuccess;
}
DEBUG_IOLog(4,"%s(%p)::message - kIOMessageServiceIsTerminated send KUNCUserNotificationDisplayNotice\n", getName(), this);
+#ifdef Use_KUNC
KUNCUserNotificationDisplayNotice(
0, // Timeout in seconds
0, // Flags (for later usage)
- "", // iconPath (not supported yet)
- "", // soundPath (not supported yet)
- "", // localizationPath (not supported yet)
- "USB Serial Unplug Notice", // the header
- "The USB Serial Pod has been unplugged while an Application was still active. This can result in loss of data.",
- "OK");
+ (char*)"", // iconPath (not supported yet)
+ (char*)"", // soundPath (not supported yet)
+ (char*)"", // localizationPath (not supported yet)
+ (char*)"USB Serial Unplug Notice", // the header
+ (char*)"The USB Serial Pod has been unplugged while an Application was still active. This can result in loss of data.",
+ (char*)"OK");
+#endif
} else {
stopSerial( false); // stop serial now
@@ -1385,15 +1389,17 @@ IOReturn err = kIOReturnSuccess;
{
fTerminate = true;
DEBUG_IOLog(4,"%s(%p)::message - startSerial failed\n", getName(), this);
+#ifdef Use_KUNC
KUNCUserNotificationDisplayNotice(
0, // Timeout in seconds
0, // Flags (for later usage)
- "", // iconPath (not supported yet)
- "", // soundPath (not supported yet)
- "", // localizationPath (not supported yet)
- "USB Serial Problem Notice", // the header
- "The USB Serial Pod has experienced difficulties. To continue either replug the device (if external) or restart the computer",
- "OK");
+ (char*)"", // iconPath (not supported yet)
+ (char*)"", // soundPath (not supported yet)
+ (char*)"", // localizationPath (not supported yet)
+ (char*)"USB Serial Problem Notice", // the header
+ (char*)"The USB Serial Pod has experienced difficulties. To continue either replug the device (if external) or restart the computer",
+ (char*)"OK");
+#endif
}
else {
@@ -1439,7 +1445,7 @@ IOReturn err = kIOReturnSuccess;
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::readPortState
+// Method: osx_pl2303::readPortState
//
// Inputs: port - the specified port
//
@@ -1449,20 +1455,20 @@ IOReturn err = kIOReturnSuccess;
//
/****************************************************************************************************/
-UInt32 nl_bjaelectronics_driver_PL2303::readPortState( PortInfo_t *port )
+UInt32 osx_pl2303::readPortState( PortInfo_t *port )
{
UInt32 returnState;
- DEBUG_IOLog(6,"nl_bjaelectronics_driver_PL2303::readPortState IOLockLock( port->serialRequestLock );\n" );
+ DEBUG_IOLog(6,"osx_pl2303::readPortState IOLockLock( port->serialRequestLock );\n" );
IOLockLock( port->serialRequestLock );
- DEBUG_IOLog(6,"nl_bjaelectronics_driver_PL2303::readPortState port->State\n", returnState );
+ DEBUG_IOLog(6,"osx_pl2303::readPortState port->State\n", returnState );
returnState = port->State;
- DEBUG_IOLog(6,"nl_bjaelectronics_driver_PL2303::readPortState IOLockUnLock( port->serialRequestLock );\n" );
+ DEBUG_IOLog(6,"osx_pl2303::readPortState IOLockUnLock( port->serialRequestLock );\n" );
IOLockUnlock( port->serialRequestLock);
- DEBUG_IOLog(6,"nl_bjaelectronics_driver_PL2303::readPortState returnstate: %p \n", returnState );
+ DEBUG_IOLog(6,"osx_pl2303::readPortState returnstate: %p \n", returnState );
return returnState;
@@ -1470,7 +1476,7 @@ UInt32 nl_bjaelectronics_driver_PL2303::readPortState( PortInfo_t *port )
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::changeState
+// Method: osx_pl2303::changeState
//
// Inputs: port - the specified port, state - new state, mask - state mask (the specific bits)
//
@@ -1483,12 +1489,12 @@ UInt32 nl_bjaelectronics_driver_PL2303::readPortState( PortInfo_t *port )
//
/****************************************************************************************************/
-void nl_bjaelectronics_driver_PL2303::changeState( PortInfo_t *port, UInt32 state, UInt32 mask )
+void osx_pl2303::changeState( PortInfo_t *port, UInt32 state, UInt32 mask )
{
UInt32 delta;
DEBUG_IOLog(6,"%s(%p)::changeState\n", getName(), this);
- DEBUG_IOLog(6,"nl_bjaelectronics_driver_PL2303::changeState IOLockLock( port->serialRequestLock );\n" );
+ DEBUG_IOLog(6,"osx_pl2303::changeState IOLockLock( port->serialRequestLock );\n" );
IOLockLock( port->serialRequestLock );
@@ -1512,7 +1518,7 @@ void nl_bjaelectronics_driver_PL2303::changeState( PortInfo_t *port, UInt32 stat
}
- DEBUG_IOLog(6,"nl_bjaelectronics_driver_PL2303::changeState IOLockUnLock( port->serialRequestLock );\n" );
+ DEBUG_IOLog(6,"osx_pl2303::changeState IOLockUnLock( port->serialRequestLock );\n" );
IOLockUnlock( port->serialRequestLock );
@@ -1548,7 +1554,7 @@ void nl_bjaelectronics_driver_PL2303::changeState( PortInfo_t *port, UInt32 stat
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::acquirePort
+// Method: osx_pl2303::acquirePort
//
// Inputs: sleep - true (wait for it), false (don't)
// refCon - the Port (not used)
@@ -1559,7 +1565,7 @@ void nl_bjaelectronics_driver_PL2303::changeState( PortInfo_t *port, UInt32 stat
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::acquirePort(bool sleep, void *refCon)
+IOReturn osx_pl2303::acquirePort(bool sleep, void *refCon)
{
IOReturn ret;
DEBUG_IOLog(4,"%s(%p)::acquirePort\n", getName(), this);
@@ -1574,23 +1580,23 @@ IOReturn nl_bjaelectronics_driver_PL2303::acquirePort(bool sleep, void *refCon)
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::acquirePortAction
+// Method: osx_pl2303::acquirePortAction
//
// Desc: Dummy pass through for acquirePortGated.
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::acquirePortAction(OSObject *owner, void *arg0, void *arg1, void *, void *)
+IOReturn osx_pl2303::acquirePortAction(OSObject *owner, void *arg0, void *arg1, void *, void *)
{
- DEBUG_IOLog(4,"nl_bjaelectronics_driver_PL2303::acquirePortAction\n");
+ DEBUG_IOLog(4,"osx_pl2303::acquirePortAction\n");
- return ((nl_bjaelectronics_driver_PL2303 *)owner)->acquirePortGated((bool)arg0, (void *)arg1);
+ return ((osx_pl2303 *)owner)->acquirePortGated((bool)arg0, (void *)arg1);
}/* end acquirePortAction */
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::acquirePortGated
+// Method: osx_pl2303::acquirePortGated
//
// Inputs: sleep - true (wait for it), false (don't), refCon - the Port
//
@@ -1605,7 +1611,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::acquirePortAction(OSObject *owner, voi
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::acquirePortGated( bool sleep, void *refCon )
+IOReturn osx_pl2303::acquirePortGated( bool sleep, void *refCon )
{
PortInfo_t *port = (PortInfo_t *) refCon;
UInt32 busyState = 0;
@@ -1664,7 +1670,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::acquirePortGated( bool sleep, void *re
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::releasePort
+// Method: osx_pl2303::releasePort
//
// Inputs: refCon - the Port (not used)
//
@@ -1674,7 +1680,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::acquirePortGated( bool sleep, void *re
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::releasePort(void *refCon)
+IOReturn osx_pl2303::releasePort(void *refCon)
{
IOReturn ret;
DEBUG_IOLog(4,"%s(%p)::releasePort\n", getName(), this);
@@ -1689,22 +1695,22 @@ IOReturn nl_bjaelectronics_driver_PL2303::releasePort(void *refCon)
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::releasePortAction
+// Method: osx_pl2303::releasePortAction
//
// Desc: Dummy pass through for releasePortGated.
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::releasePortAction(OSObject *owner, void *arg0, void *, void *, void *)
+IOReturn osx_pl2303::releasePortAction(OSObject *owner, void *arg0, void *, void *, void *)
{
- DEBUG_IOLog(4,"nl_bjaelectronics_driver_PL2303::releasePortAction\n");
+ DEBUG_IOLog(4,"osx_pl2303::releasePortAction\n");
- return ((nl_bjaelectronics_driver_PL2303 *)owner)->releasePortGated((void *) arg0);
+ return ((osx_pl2303 *)owner)->releasePortGated((void *) arg0);
}/* end releasePortAction */
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::releasePortGated
+// Method: osx_pl2303::releasePortGated
//
// Inputs: refCon - the Port
//
@@ -1716,7 +1722,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::releasePortAction(OSObject *owner, voi
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::releasePortGated( void *refCon )
+IOReturn osx_pl2303::releasePortGated( void *refCon )
{
PortInfo_t *port = (PortInfo_t *) refCon;
UInt32 busyState;
@@ -1753,7 +1759,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::releasePortGated( void *refCon )
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::setState
+// Method: osx_pl2303::setState
//
// Inputs: state - state to set
// mask - state mask
@@ -1765,7 +1771,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::releasePortGated( void *refCon )
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::setState(UInt32 state, UInt32 mask, void *refCon)
+IOReturn osx_pl2303::setState(UInt32 state, UInt32 mask, void *refCon)
{
PortInfo_t *port = (PortInfo_t *) refCon;
IOReturn ret;
@@ -1805,23 +1811,23 @@ IOReturn nl_bjaelectronics_driver_PL2303::setState(UInt32 state, UInt32 mask, vo
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::setStateAction
+// Method: osx_pl2303::setStateAction
//
// Desc: Dummy pass through for setStateGated.
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::setStateAction(OSObject *owner, void *arg0, void *arg1, void *arg2, void *)
+IOReturn osx_pl2303::setStateAction(OSObject *owner, void *arg0, void *arg1, void *arg2, void *)
{
- DEBUG_IOLog(4,"nl_bjaelectronics_driver_PL2303::setStateAction\n");
+ DEBUG_IOLog(4,"osx_pl2303::setStateAction\n");
- return ((nl_bjaelectronics_driver_PL2303 *)owner)->setStateGated((UInt32)arg0, (UInt32)arg1, (void *)arg2);
+ return ((osx_pl2303 *)owner)->setStateGated((long)arg0, (long)arg1, arg2);
}/* end setStateAction */
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::setState
+// Method: osx_pl2303::setState
//
// Inputs: state - state to set, mask - state mask, refCon - the Port
//
@@ -1838,7 +1844,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::setStateAction(OSObject *owner, void *
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::setStateGated( UInt32 state, UInt32 mask, void *refCon )
+IOReturn osx_pl2303::setStateGated( UInt32 state, UInt32 mask, void *refCon )
{
PortInfo_t *port = (PortInfo_t *) refCon;
DEBUG_IOLog(4,"%s(%p)::setStateGated\n", getName(), this);
@@ -1865,7 +1871,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::setStateGated( UInt32 state, UInt32 ma
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::watchState
+// Method: osx_pl2303::watchState
//
// Inputs: state - state to watch for
// mask - state mask bits
@@ -1877,7 +1883,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::setStateGated( UInt32 state, UInt32 ma
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::watchState(UInt32 *state, UInt32 mask, void *refCon)
+IOReturn osx_pl2303::watchState(UInt32 *state, UInt32 mask, void *refCon)
{
IOReturn ret;
DEBUG_IOLog(4,"%s(%p)::watchState state %p mask %p\n", getName(), this, *state, mask);
@@ -1897,24 +1903,24 @@ IOReturn nl_bjaelectronics_driver_PL2303::watchState(UInt32 *state, UInt32 mask,
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::watchStateAction
+// Method: osx_pl2303::watchStateAction
//
// Desc: Dummy pass through for watchStateGated.
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::watchStateAction(OSObject *owner, void *arg0, void *arg1, void *, void *)
+IOReturn osx_pl2303::watchStateAction(OSObject *owner, void *arg0, void *arg1, void *, void *)
{
- DEBUG_IOLog(4,"nl_bjaelectronics_driver_PL2303::watchStateAction\n");
+ DEBUG_IOLog(4,"osx_pl2303::watchStateAction\n");
- return ((nl_bjaelectronics_driver_PL2303 *)owner)->watchStateGated((UInt32 *)arg0, (UInt32)arg1);
+ return ((osx_pl2303 *)owner)->watchStateGated((UInt32*)((long *)arg0), (long)arg1);
}/* end watchStateAction */
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::watchState
+// Method: osx_pl2303::watchState
//
// Inputs: state - state to watch for, mask - state mask bits, refCon - the Port
//
@@ -1926,7 +1932,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::watchStateAction(OSObject *owner, void
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::watchStateGated( UInt32 *state, UInt32 mask)
+IOReturn osx_pl2303::watchStateGated( UInt32 *state, UInt32 mask)
{
IOReturn ret = kIOReturnNotOpen;
DEBUG_IOLog(4,"%s(%p)::watchStateGated state: %p mask: %p\n", getName(), this, *state, mask);
@@ -1946,7 +1952,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::watchStateGated( UInt32 *state, UInt32
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::nextEvent
+// Method: osx_pl2303::nextEvent
//
// Inputs: refCon - the Port
//
@@ -1956,7 +1962,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::watchStateGated( UInt32 *state, UInt32
//
/****************************************************************************************************/
-UInt32 nl_bjaelectronics_driver_PL2303::nextEvent( void *refCon )
+UInt32 osx_pl2303::nextEvent( void *refCon )
{
UInt32 ret = kIOReturnSuccess;
DEBUG_IOLog(4,"%s(%p)::nextEvent\n", getName(), this);
@@ -1968,7 +1974,7 @@ UInt32 nl_bjaelectronics_driver_PL2303::nextEvent( void *refCon )
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::executeEvent
+// Method: osx_pl2303::executeEvent
//
// Inputs: event - The event
// data - any data associated with the event
@@ -1980,7 +1986,7 @@ UInt32 nl_bjaelectronics_driver_PL2303::nextEvent( void *refCon )
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::executeEvent(UInt32 event, UInt32 data, void *refCon)
+IOReturn osx_pl2303::executeEvent(UInt32 event, UInt32 data, void *refCon)
{
IOReturn ret;
DEBUG_IOLog(4,"%s(%p)::executeEventAction\n", getName(), this);
@@ -1995,24 +2001,24 @@ IOReturn nl_bjaelectronics_driver_PL2303::executeEvent(UInt32 event, UInt32 data
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::executeEventAction
+// Method: osx_pl2303::executeEventAction
//
// Desc: Dummy pass through for executeEventGated.
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::executeEventAction(OSObject *owner, void *arg0, void *arg1, void *arg2, void *)
+IOReturn osx_pl2303::executeEventAction(OSObject *owner, void *arg0, void *arg1, void *arg2, void *)
{
- DEBUG_IOLog(4,"nl_bjaelectronics_driver_PL2303::executeEventAction\n");
+ DEBUG_IOLog(4,"osx_pl2303::executeEventAction\n");
- return ((nl_bjaelectronics_driver_PL2303 *)owner)->executeEventGated((UInt32)arg0, (UInt32)arg1, (void *)arg2);
+ return ((osx_pl2303 *)owner)->executeEventGated((long)arg0, (long)arg1, (void *)arg2);
}/* end executeEventAction */
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::executeEventGated
+// Method: osx_pl2303::executeEventGated
//
//
// Inputs: event - The event, data - any data associated with the event, refCon - the Port
@@ -2024,7 +2030,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::executeEventAction(OSObject *owner, vo
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::executeEventGated( UInt32 event, UInt32 data, void *refCon )
+IOReturn osx_pl2303::executeEventGated( UInt32 event, UInt32 data, void *refCon )
{
PortInfo_t *port = (PortInfo_t *) refCon;
IOReturn ret = kIOReturnSuccess;
@@ -2371,7 +2377,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::executeEventGated( UInt32 event, UInt3
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::requestEvent
+// Method: osx_pl2303::requestEvent
//
// Inputs: event - The event
// refCon - the Port (not used)
@@ -2383,7 +2389,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::executeEventGated( UInt32 event, UInt3
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::requestEvent(UInt32 event, UInt32 *data, void *refCon)
+IOReturn osx_pl2303::requestEvent(UInt32 event, UInt32 *data, void *refCon)
{
IOReturn ret;
@@ -2399,23 +2405,23 @@ IOReturn nl_bjaelectronics_driver_PL2303::requestEvent(UInt32 event, UInt32 *dat
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::requestEventAction
+// Method: osx_pl2303::requestEventAction
//
// Desc: Dummy pass through for requestEventGated.
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::requestEventAction(OSObject *owner, void *arg0, void *arg1, void *arg2, void *)
+IOReturn osx_pl2303::requestEventAction(OSObject *owner, void *arg0, void *arg1, void *arg2, void *)
{
- DEBUG_IOLog(4,"nl_bjaelectronics_driver_PL2303::requestEventAction\n");
+ DEBUG_IOLog(4,"osx_pl2303::requestEventAction\n");
- return ((nl_bjaelectronics_driver_PL2303 *)owner)->requestEventGated((UInt32)arg0, (UInt32 *)arg1, (void *)arg2);
+ return ((osx_pl2303 *)owner)->requestEventGated((long)arg0, (UInt32 *)((long *)arg1), (void *)arg2);
}/* end requestEventAction */
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::requestEvent
+// Method: osx_pl2303::requestEvent
//
// Inputs: event - The event, refCon - the Port
//
@@ -2429,7 +2435,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::requestEventAction(OSObject *owner, vo
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::requestEventGated( UInt32 event, UInt32 *data, void *refCon )
+IOReturn osx_pl2303::requestEventGated( UInt32 event, UInt32 *data, void *refCon )
{
PortInfo_t *port = (PortInfo_t *) refCon;
IOReturn returnValue = kIOReturnSuccess;
@@ -2582,7 +2588,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::requestEventGated( UInt32 event, UInt3
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::enqueueEvent
+// Method: osx_pl2303::enqueueEvent
//
// Inputs: event - The event, data - any data associated with the event,
// sleep - true (wait for it), false (don't), refCon - the Port
@@ -2593,7 +2599,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::requestEventGated( UInt32 event, UInt3
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::enqueueEvent( UInt32 event, UInt32 data, bool sleep, void *refCon)
+IOReturn osx_pl2303::enqueueEvent( UInt32 event, UInt32 data, bool sleep, void *refCon)
{
DEBUG_IOLog(2,"%s(%p)::enqueueEvent event: %p \n", getName(), this, data);
PortInfo_t *port = (PortInfo_t *) refCon;
@@ -2651,7 +2657,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::enqueueEvent( UInt32 event, UInt32 dat
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::dequeueEvent
+// Method: osx_pl2303::dequeueEvent
//
// Inputs: sleep - true (wait for it), false (don't), refCon - the Port
//
@@ -2661,7 +2667,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::enqueueEvent( UInt32 event, UInt32 dat
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::dequeueEvent( UInt32 *event, UInt32 *data, bool sleep, void *refCon )
+IOReturn osx_pl2303::dequeueEvent( UInt32 *event, UInt32 *data, bool sleep, void *refCon )
{
DEBUG_IOLog(4,"%s(%p)::dequeueEvent\n", getName(), this);
@@ -2681,7 +2687,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::dequeueEvent( UInt32 *event, UInt32 *d
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::enqueueData
+// Method: osx_pl2303::enqueueData
//
// Inputs: buffer - the data
// size - number of bytes
@@ -2695,7 +2701,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::dequeueEvent( UInt32 *event, UInt32 *d
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::enqueueData(UInt8 *buffer, UInt32 size, UInt32 *count, bool sleep, void *refCon)
+IOReturn osx_pl2303::enqueueData(UInt8 *buffer, UInt32 size, UInt32 *count, bool sleep, void *refCon)
{
IOReturn ret;
@@ -2712,22 +2718,22 @@ IOReturn nl_bjaelectronics_driver_PL2303::enqueueData(UInt8 *buffer, UInt32 size
/****************************************************************************************************/
//
-// Method: nl_bjaelectronics_driver_PL2303::enqueueDatatAction
+// Method: osx_pl2303::enqueueDatatAction
//
// Desc: Dummy pass through for equeueDataGated.
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::enqueueDataAction(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3)
+IOReturn osx_pl2303::enqueueDataAction(OSObject *owner, void *arg0, void *arg1, void *arg2, void *arg3)
{
- return ((nl_bjaelectronics_driver_PL2303 *)owner)->enqueueDataGated((UInt8 *)arg0, (UInt32)arg1, (UInt32 *)arg2, (bool)arg3);
+ return ((osx_pl2303 *)owner)->enqueueDataGated((UInt8 *)arg0, (UInt32)((long)arg1), (UInt32 *)((long *)arg2), (bool)arg3);
}/* end enqueueDataAction */
/****************************************************************************************************/
//
//
-// Method: nl_bjaelectronics_driver_PL2303::enqueueData
+// Method: osx_pl2303::enqueueData
//
// Inputs: buffer - the data, size - number of bytes, sleep - true (wait for it), false (don't),
// refCon - the Port
@@ -2748,7 +2754,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::enqueueDataAction(OSObject *owner, voi
//
/****************************************************************************************************/
-IOReturn nl_bjaelectronics_driver_PL2303::enqueueDataGated( UInt8 *buffer, UInt32 size, UInt32 *count, bool sleep)
+IOReturn osx_pl2303::enqueueDataGated( UInt8 *buffer, UInt32 size, UInt32 *count, bool sleep)
{
UInt32 state = PD_S_TXQ_LOW_WATER;
IOReturn rtn = kIOReturnSuccess;
@@ -2825,7 +2831,7 @@ IOReturn nl_bjaelectronics_driver_PL2303::enqueueDataGated( UInt8 *buffer, UInt3
/****************************************************************************************************/
//