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 ?
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)
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem