TsctlAIOChannelSamplePeriodDesc

From embeddedTS Manuals

This function sets and returns the sample period for the specified channel ch to be the given number of nanoseconds ns. If the channel is not currently enabled, then the sample period will not take effect until ChannelEnable is called for this channel. Otherwise the change will take place immediately.

If a value of 0 is passed for ns, the current value in effect is returned unchanged.

Upon failure, a value of 0 is returned to indicate that the requested sample period cannot be set. If the sample period will not take effect immediately then this cannot occur, so the current sample period will be returned, since the one passed has not yet taken effect.