C stuff

In this category I added my software projects written in plain C, but there is also a collection of articles on various subjects that deal with broader subjects like low level programming, driver development on Mac and Linux, preprocessing, building, compiling and other topics. I tried to bring some value added by especially highlighting my failures and the source of the issues I faced. I mostly learn from mistakes, I believe that other do too.

Abandoned Posts

Over the past seven years (the age of this blog) I started writing several articles that I never  finished. It’s time to trash them completely or just add them to a list for future afterthoughts. Who knows ? So, from older to newer: “Weller WD 1000 M Review – Part III – Software”, January 18, 2013 — […]

SCPI on Mac

Some more days passed and some more finishing touches added to my MacSCPI app. It is entirely dependent on hooking the device via the USBTMC driver, but it works fine and is stable: I had some problems with buffer padding and the output it is still not 100% gibberish–free , but I assume I have to play with […]

USBTMC driver for Mac

After some head banging, I finally managed to send SCPI commands from my Mac to my Agilent (Keysight) DSOX2002A. I’ve worked on this since december last year. Almost a year, but I did not spent a sustained amount of effort. I did it just during my free time. I still have a day job that […]

Writing serial drivers for OS X (1)

At least one thing can be improved on Mac Dev Center: the code sample repository. I am not talking about documentation. In this particular case, there’s not much new to write about. The I/O Kit documentation (grab the pdf while it is stil there) is sufficient. On the shelves are tons on books about C and […]

__attribute__((packed))

The keyword __attribute__ allows you to specify special attributes of struct and union types when you define such types. This is mostly encountered when designing code with particular care on memory footprint optimisation.  I have encountered this several times in some Apple headers while digging for documentation for my kext projects, and I thought it […]

Agilent DSOX 2002A

Agilent DSO-X 2002A driver for Mac OS X

December again, another year passed. Traditionally, this is a month when I am taking a long break. But I was up to something in the past days and I wanted to share. I have created a driver for my KeysightAgilent DSO-X 2002A oscilloscope. Maybe not a big deal, but huge for me because this is […]

Usage of void in C

Going into some USB programming for a project I am into (on my Mac), I ran into this and I thought would be nice and useful to elaborate a bit. This is about void* pointers and callbacks in C. USB device discovery and probing under IOKit makes heavy use of callbacks, I wanted to write […]