com.sun.spot.sensorboard.io
Interface IPWMOutput
public interface IPWMOutput
Interface PWMOutput provides access to a PWM (Pulse Width Modulated) output.
- Author:
- jn151271
09-Mar-2005
getPeriodLengthInTicks
int getPeriodLengthInTicks()
- Returns:
- the number of cycles into which a single PWM period is divided.
setDutyLength
void setDutyLength(int dutyTicks)
- Parameters:
dutyTicks - the number of cycles within a single PWM period for which the output
is to be switched on. So
setDutyLength(0);
leaves the output at 0 while
setDutyLength(getPeriodLengthInTicks());
turns it on fully.
getTickLengthInMicroSeconds
int getTickLengthInMicroSeconds()
- Returns:
- the length in micoseconds of a single cycle, i.e. the length of a PWM period
(in microseconds) divided by the number of cycles within a period.
Copyright © 2007 Sun Microsystems, Inc. All Rights Reserved.