github.com/aykevl/tinygo@v0.5.0/src/machine/machine_dummy.go (about)

     1  // +build !avr,!nrf,!sam,!stm32
     2  
     3  package machine
     4  
     5  // Dummy machine package, filled with no-ops.
     6  
     7  type GPIOMode uint8
     8  
     9  const (
    10  	GPIO_INPUT = iota
    11  	GPIO_OUTPUT
    12  )
    13  
    14  // Fake LED numbers, for testing.
    15  const (
    16  	LED  = LED1
    17  	LED1 = 0
    18  	LED2 = 0
    19  	LED3 = 0
    20  	LED4 = 0
    21  )
    22  
    23  // Fake button numbers, for testing.
    24  const (
    25  	BUTTON  = BUTTON1
    26  	BUTTON1 = 0
    27  	BUTTON2 = 0
    28  	BUTTON3 = 0
    29  	BUTTON4 = 0
    30  )
    31  
    32  func (p GPIO) Configure(config GPIOConfig) {
    33  }
    34  
    35  func (p GPIO) Set(value bool) {
    36  }
    37  
    38  func (p GPIO) Get() bool {
    39  	return false
    40  }