github.com/usbarmory/tamago@v0.0.0-20240508072735-8612bbe1e454/board/qemu/sifive_u/console.go (about)

     1  // QEMU sifive_u support for tamago/riscv64
     2  // https://github.com/usbarmory/tamago
     3  //
     4  // Copyright (c) WithSecure Corporation
     5  // https://foundry.withsecure.com
     6  //
     7  // Use of this source code is governed by the license
     8  // that can be found in the LICENSE file.
     9  
    10  //go:build !linkprintk
    11  // +build !linkprintk
    12  
    13  package sifive_u
    14  
    15  import (
    16  	_ "unsafe"
    17  
    18  	"github.com/usbarmory/tamago/soc/sifive/fu540"
    19  )
    20  
    21  //go:linkname printk runtime.printk
    22  func printk(c byte) {
    23  	fu540.UART0.Tx(c)
    24  }