Skip to content

An attempt to convert Apples SerialPortSample project over to Swift

License

Notifications You must be signed in to change notification settings

danielpi/SwiftSerialPortSample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftSerialPortSample

An attempt to convert Apples SerialPortSample project over to Swift

The serial port sample from Apple is a simple application written in C that shows some of the tasks required for interacting with a serial port from Mac OS X. It covers IOKit as well as the POSIX commands that are used to find serial ports, open them, change their attributes etc.

As a C program there are a lot of challenges in converting this over to Swift. CoreFoundation is supposedly simple to use from Swift, though I have found a few issues. The POSIX function calls are not very well supported either.

This experiment has been updated to Swift 2.0 and is actually slightly functional.

Issues, Annoyances

ioctl and fcntl aren't useable from Swift as they need varags.

About

An attempt to convert Apples SerialPortSample project over to Swift

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages