Question about SignalGenerator functionality

This is the code example from GHI.

I have couple questions as I couldn’t find any other documentation.

  1. Do I need to use pull down resistor for SignalGenerator pin?
  2. What are the time array elements represent? Is the first element duration for pin to be in ON state and second element is duration for the pin OFF?
public static void Main()
        uint[] time = new uint[] { 500 * 1000, 500 * 1000 };
        SignalGenerator LED = new SignalGenerator(Cpu.Pin.GPIO_Pin1, false);

        // args:  initial value,
        //        array of times,
        //        array start offset,
        //        length of array,
        //        repeat -- if true ==> repeat
        LED.Set(false, time, 0, 2, true);//start the waveform

        //... do more code here and the LED will continue to work.
        //... because the default running mode is non-blocking. 

Time in microseconds.

Already figured out about microseconds. The questions about pull-down resistor and time array still remains.

@ EvoMotors - no pull down needed with an output port. which part of documentation is not clear about the initial state in the array?

Answering my own question. Te values in the array are exactly what I was expected.

 { microsecondsOn, microsecondsOff, microsecondsOn, microsecondsOff,....... };

based upon the code you posted, the result would be off,on,off,on,…

the initial value parameter determines the output state of the first interval in the array. if both vales in the array are the same, and the output is repeated, the first position state does not really matter. but, if you were trying to be a serial port, it would certainly matter.