MCPcopy Index your code
hub / github.com/benfry/processing4 / clear

Method clear

java/libraries/io/src/processing/io/PWM.java:101–111  ·  view source on GitHub ↗

Disables the PWM output @webref PWM @webBrief Disables the PWM output

()

Source from the content-addressed store, hash-verified

99 * @webBrief Disables the PWM output
100 */
101 public void clear() {
102 if (NativeInterface.isSimulated()) {
103 return;
104 }
105
106 String fn = String.format("/sys/class/pwm/%s/pwm%d/enable", chip, channel);
107 int ret = NativeInterface.writeFile(fn, "0");
108 if (ret < 0) {
109 throw new RuntimeException(NativeInterface.getError(ret));
110 }
111 }
112
113
114 /**

Callers 1

digitalWriteMethod · 0.45

Calls 4

isSimulatedMethod · 0.95
writeFileMethod · 0.95
getErrorMethod · 0.95
formatMethod · 0.65

Tested by

no test coverage detected