Documentation ¶
Overview ¶
Package peripherals implements the optional modules that can make up the ARM processor. For example: timers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RNG ¶
type RNG struct {
// contains filtered or unexported fields
}
RNG implements the RNG found in STM32 packages.
The implementation is just a sketch of the real RNG unit but for our purposes it's probably okay. It basically returns a random 32bit number whenever the data register is read
func NewRNG ¶
func NewRNG(env *environment.Environment, mmap architecture.Map) RNG
func (*RNG) Plumb ¶ added in v0.31.0
func (r *RNG) Plumb(env *environment.Environment)
type Timer ¶
type Timer struct {
// contains filtered or unexported fields
}
Timer implements a simple timer as used in the LCP2000.
func NewTimer ¶
func NewTimer(mmap architecture.Map) Timer
type Timer2 ¶
type Timer2 struct {
// contains filtered or unexported fields
}
Timer2 implements the TIM2 timer found in STM32 processors.
func NewTimer2 ¶
func NewTimer2(mmap architecture.Map) Timer2
func (*Timer2) ResolveDeferredCycles ¶ added in v0.25.0
func (t *Timer2) ResolveDeferredCycles()
ResolveDeferredCycles makes sure that the TIM2 registers are updated. Under normal operation the resolve function is called automatically when the TIM2CNT value is required. But it should also be called when the emulation ends (either naturally or as a result of a breakpoint etc.) so that debugging information is accurate.