mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 06:53:40 +00:00
machine: split board definitions in separate files
This commit is contained in:
@@ -13,9 +13,6 @@ const (
|
||||
GPIO_OUTPUT
|
||||
)
|
||||
|
||||
// LED on the Arduino
|
||||
const LED = 13
|
||||
|
||||
func (p GPIO) Configure(config GPIOConfig) {
|
||||
if config.Mode == GPIO_OUTPUT { // set output bit
|
||||
if p.Pin < 8 {
|
||||
@@ -125,16 +122,6 @@ func (pwm PWM) Set(value uint16) {
|
||||
}
|
||||
}
|
||||
|
||||
// ADC on the Arduino
|
||||
const (
|
||||
ADC0 = 0
|
||||
ADC1 = 1
|
||||
ADC2 = 2
|
||||
ADC3 = 3
|
||||
ADC4 = 4
|
||||
ADC5 = 5
|
||||
)
|
||||
|
||||
// InitADC initializes the registers needed for ADC.
|
||||
func InitADC() {
|
||||
// set a2d prescaler so we are inside the desired 50-200 KHz range at 16MHz.
|
||||
|
||||
Reference in New Issue
Block a user