mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-10 18:03:41 +00:00
all: do not use machine.TWI_FREQ_* constants
These constants were always a bit weird:
* they use an uncommon name (TWI instead of I2C)
* they don't follow Go naming conventions (CamelCase)
* the constants don't provide much value: their name is their value
(100KHZ => 100e3).
Therefore, I propose we remove them and replace them with regular
numeric constants.
This commit is contained in:
@@ -15,7 +15,7 @@ var (
|
||||
|
||||
func main() {
|
||||
|
||||
i2c.Configure(machine.I2CConfig{Frequency: machine.TWI_FREQ_400KHZ})
|
||||
i2c.Configure(machine.I2CConfig{Frequency: 400e3})
|
||||
sensor.Configure()
|
||||
|
||||
for {
|
||||
|
||||
Reference in New Issue
Block a user