Disables the PWM output @webref PWM @webBrief Disables the PWM output
()
| 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 | /** |
no test coverage detected