nrf: fix double stop signal in I2C
Этот коммит содержится в:
родитель
9e61e6fe4d
коммит
d39c7abb4d
1 изменённых файлов: 0 добавлений и 4 удалений
|
@ -260,10 +260,6 @@ func (i2c I2C) Configure(config I2CConfig) {
|
|||
// bytes and stores them in r, and generates a stop condition on the bus.
|
||||
func (i2c I2C) Tx(addr uint16, w, r []byte) (err error) {
|
||||
i2c.Bus.ADDRESS.Set(uint32(addr))
|
||||
defer func() {
|
||||
i2c.signalStop()
|
||||
i2c.Bus.SHORTS.Set(nrf.TWI_SHORTS_BB_SUSPEND_Disabled)
|
||||
}()
|
||||
|
||||
if len(w) != 0 {
|
||||
i2c.Bus.TASKS_STARTTX.Set(1) // start transmission for writing
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче