aethaniel / ExperimentalCore-sam

Experimental new core for Arduino Due and other Atmel SAM boards
GNU Lesser General Public License v2.1
16 stars 10 forks source link

Bring Analog API to life #24

Open aethaniel opened 8 years ago

logos-electromechanical commented 8 years ago

I'm working on this for SAM4S now and I've noticed that it would be extremely convenient to have a couple of things...

1) 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?

2) 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?

logos-electromechanical commented 8 years ago

Assuming no comments, I will test my implementation of this this weekend and then generate a pull request.

aethaniel commented 8 years ago

sorry to be late on this, your questions raise interest. I have to invest on this to answer you properly.