mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 23:13:40 +00:00
all: format code according to Go 1.19 rules
Go 1.19 started reformatting code in a way that makes it more obvious how it will be rendered on pkg.go.dev. It gets it almost right, but not entirely. Therefore, I had to modify some of the comments so that they are formatted correctly.
This commit is contained in:
@@ -115,7 +115,7 @@ func (t *TIM) SetMatchInterrupt(channel uint8, callback ChannelCallback) error {
|
||||
// SetPeriod updates the period of this PWM peripheral.
|
||||
// To set a particular frequency, use the following formula:
|
||||
//
|
||||
// period = 1e9 / frequency
|
||||
// period = 1e9 / frequency
|
||||
//
|
||||
// If you use a period of 0, a period that works well for LEDs will be picked.
|
||||
//
|
||||
@@ -195,7 +195,7 @@ func (t *TIM) Channel(pin Pin) (uint8, error) {
|
||||
// Set updates the channel value. This is used to control the channel duty
|
||||
// cycle. For example, to set it to a 25% duty cycle, use:
|
||||
//
|
||||
// t.Set(ch, t.Top() / 4)
|
||||
// t.Set(ch, t.Top() / 4)
|
||||
//
|
||||
// ch.Set(0) will set the output to low and ch.Set(ch.Top()) will set the output
|
||||
// to high, assuming the output isn't inverted.
|
||||
|
||||
Reference in New Issue
Block a user