tinygo_pwm

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2025 License: GPL-3.0 Imports: 1 Imported by: 2

README

tinygo-pwm

PWM interfaces and functions for TinyGo projects

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDuty

func SetDuty(pwm PWM, channel uint8, pulseMicroseconds, periodMicroseconds uint32)

SetDuty sets the duty cycle of a PWM signal given the pulse width and period width in microseconds.

Parameters:

pwm: PWM to control its signal channel: PWM channel pulseMicroseconds: pulse width in microseconds periodMicroseconds: period width in microseconds

Types

type PWM

type PWM interface {
	Configure(config machine.PWMConfig) error
	Channel(pin machine.Pin) (channel uint8, err error)
	Top() uint32
	Set(channel uint8, value uint32)
}

PWM is the interface necessary for controlling PWM signals.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL