ExperimentalCore-sam
ExperimentalCore-sam copied to clipboard
Bring Analog API to life
I'm working on this for SAM4S now and I've noticed that it would be extremely convenient to have a couple of things...
-
Define the peripheral used for PWM or Timer on that pin in the PinDescription somewhere other than the ulPinType member. This is because, at least for the Arachnio, I share some pins between PWM/Timer output and a different function. This will require at a bit of work for each variant. Thoughts?
-
Copy over some utility functions from libsam to a common location. In particular, it would be nice to have PIO_SetPeripheral() and I suspect others as well. I was considering dragging it over as a local function for core_analog, but I realized that I'm going to want it other places as well. How do folks feel about adding a core_utils.{h|c} for this and similar functions?
Assuming no comments, I will test my implementation of this this weekend and then generate a pull request.
sorry to be late on this, your questions raise interest. I have to invest on this to answer you properly.