github.com/usbarmory/tamago@v0.0.0-20240508072735-8612bbe1e454/soc/bcm2835/timer.go (about)

     1  // BCM2835 SoC timer support
     2  // https://github.com/usbarmory/tamago
     3  //
     4  // Copyright (c) the bcm2835 package authors
     5  //
     6  // Use of this source code is governed by the license
     7  // that can be found in the LICENSE file.
     8  
     9  package bcm2835
    10  
    11  import (
    12  	"time"
    13  )
    14  
    15  // WatchdogPeriod is the fixed 16us frequency of the BCM2835 watchdog.
    16  const WatchdogPeriod = uint64(16 * time.Microsecond)
    17  
    18  // SysTimerFreq is the frequency (Hz) of the BCM2835 free-running
    19  // timer (fixed at 1Hz).
    20  const SysTimerFreq = 1000000
    21  
    22  // defined in timer.s
    23  func read_systimer() int64