github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/device/avr/avr.go (about)

     1  package avr
     2  
     3  // Run the given assembly code. The code will be marked as having side effects,
     4  // as it doesn't produce output and thus would normally be eliminated by the
     5  // optimizer.
     6  func Asm(asm string)
     7  
     8  // Run the given inline assembly. The code will be marked as having side
     9  // effects, as it would otherwise be optimized away. The inline assembly string
    10  // recognizes template values in the form {name}, like so:
    11  //
    12  //	avr.AsmFull(
    13  //	    "str {value}, {result}",
    14  //	    map[string]interface{}{
    15  //	        "value":  1
    16  //	        "result": &dest,
    17  //	    })
    18  //
    19  // You can use {} in the asm string (which expands to a register) to set the
    20  // return value.
    21  func AsmFull(asm string, regs map[string]interface{}) uintptr