mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-20 22:49:02 +00:00
i2csoft: add source code for each target
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
//go:build nrf52840
|
||||
// +build nrf52840
|
||||
|
||||
package i2csoft
|
||||
|
||||
import (
|
||||
"device"
|
||||
)
|
||||
|
||||
// wait waits for half the time of the SCL operation interval. It is set to
|
||||
// about 100 kHz.
|
||||
func (i2c *I2C) wait() {
|
||||
wait := 26
|
||||
for i := 0; i < wait; i++ {
|
||||
device.Asm(`nop`)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user