Skip to content

Commit c4e171d

Browse files
committed
More info about PWM channel for LinuxFS
1 parent f3d2d4a commit c4e171d

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

  • content/documentation/io-examples

content/documentation/io-examples/pwm.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -278,17 +278,17 @@ public class BuzzerComponent extends Component {
278278
.shutdown(0)
279279
.build();
280280
}
281-
/**
282-
* Builds a new PWM configuration for the buzzer using linuxfs-pwm
283-
* @param pi4j Pi4J context
284-
* @param address Channel
285-
* @return PWM configuration
286-
*/
287-
protected static PwmConfig buildPwmConfig(Context pi4j, int address) {
288-
return Pwm.newConfigBuilder(pi4j)
289-
.id("Channel" + address)
281+
282+
/** Builds a new PWM configuration for the buzzer using linuxfs-pwm
283+
* @param pi4j Pi4J context
284+
* @param channel Channel
285+
* @return PWM configuration
286+
*/
287+
protected static PwmConfig buildPwmConfig(Context pi4j, int channel) {
288+
return Pwm.newConfigBuilder(pi4j)
289+
.id("Channel" + channel)
290290
.name("Buzzer")
291-
.address(address)
291+
.address(channel)
292292
.pwmType(PwmType.HARDWARE)
293293
.provider("linuxfs-pwm")
294294
.initial(0)

0 commit comments

Comments
 (0)