MCPcopy Index your code
hub / github.com/processing/processing / clear

Method clear

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

Disables the PWM output @webref

()

Source from the content-addressed store, hash-verified

93 * @webref
94 */
95 public void clear() {
96 if (NativeInterface.isSimulated()) {
97 return;
98 }
99
100 String fn = String.format("/sys/class/pwm/%s/pwm%d/enable", chip, channel);
101 int ret = NativeInterface.writeFile(fn, "0");
102 if (ret < 0) {
103 throw new RuntimeException(NativeInterface.getError(ret));
104 }
105 }
106
107
108 /**

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