avr: remove I2C stubs from attiny support

These stubs don't really belong there: attiny currently doesn't directly
support I2C at all (although it has hardware to support a software
implementation).
Этот коммит содержится в:
Ayke van Laethem 2021-02-06 12:32:13 +01:00 коммит произвёл Ron Evans
родитель 0535c1bbad
коммит 71bbe93ab2
4 изменённых файлов: 8 добавлений и 17 удалений

Просмотреть файл

@ -1,4 +1,4 @@
// +build avr nrf sam stm32,!stm32l0 fe310 k210
// +build atmega nrf sam stm32,!stm32l0 fe310 k210
package machine

Просмотреть файл

@ -9,6 +9,13 @@ import (
"unsafe"
)
// I2C on AVR.
type I2C struct {
}
// I2C0 is the only I2C interface on most AVRs.
var I2C0 = I2C{}
// I2CConfig is used to store config info for I2C.
type I2CConfig struct {
Frequency uint32

Просмотреть файл

@ -1,9 +0,0 @@
// +build avr,attiny
package machine
// Tx is a dummy implementation. I2C has not been implemented for ATtiny
// devices.
func (i2c I2C) Tx(addr uint16, w, r []byte) error {
return nil
}

Просмотреть файл

@ -141,10 +141,3 @@ func (a ADC) Get() uint16 {
return uint16(avr.ADCL.Get()) | uint16(avr.ADCH.Get())<<8
}
// I2C on AVR.
type I2C struct {
}
// I2C0 is the only I2C interface on most AVRs.
var I2C0 = I2C{}