-
• #2
Yes, I think jshSetOutputValue gets the JshPinFunction which defines the DAC or PWM device that is used. The PinFunctions come out of jsPinInfo.
IIRC, there are 4 bits in the Pin Function free for the DAC number, so you could have up to 16 DACs - it's just that the only devices Espruino runs on currently have 2 DAC channels (obviously multiple PWM though)
As far as I can see, there are only 2 DAC channel supported.
JSH_DAC_CH1 and JSH_DAC_CH2
So for jshSetOutputValue in jshardware.c there is no pin information available(directly)
Is this correct ?