Documentation
¶
Index ¶
- Constants
- func ConvertImage(raw []byte) *image.RGBA
- type Brightness
- type ByteState
- type Emulator
- func (e *Emulator) Brightness() Brightness
- func (e *Emulator) Close()
- func (e *Emulator) CloseRunlog()
- func (e *Emulator) DidSPIFlashChange() bool
- func (e *Emulator) DisableHeapTracker()
- func (e *Emulator) DoTouch(gesture TouchGesture, x, y int)
- func (e *Emulator) EnableHeapTracker()
- func (e *Emulator) FindFreeHeapBlocks()
- func (e *Emulator) InstructionsPerSecond() uint64
- func (e *Emulator) IsDisplaySleeping() bool
- func (e *Emulator) IsPinSet(pin int) bool
- func (e *Emulator) LoadState(state []byte) bool
- func (e *Emulator) NumRTC() int
- func (e *Emulator) PinClear(pin int)
- func (e *Emulator) PinSet(pin int)
- func (e *Emulator) RTCTrackers() []*RTCTracker
- func (e *Emulator) ReadDisplayBuffer(p []byte)
- func (e *Emulator) ReadMemory(addr uint32) uint32
- func (e *Emulator) ReadVariable(name string, offset uint32) (value uint64, found bool)
- func (e *Emulator) RecordRunlog(path string) error
- func (e *Emulator) ReleaseTouch()
- func (e *Emulator) RunIterations(iterations uint64, iterations_per_us uint64) int
- func (e *Emulator) SPIFlash() []byte
- func (e *Emulator) SaveState() []byte
- func (e *Emulator) SetFrequency(hz uint)
- func (e *Emulator) SetHeartrateValue(val uint32)
- func (e *Emulator) Start(mode RunMode)
- func (e *Emulator) Stop() RunMode
- func (e *Emulator) WriteVariable(name string, offset uint32, value uint64)
- type Function
- type FunctionDefinition
- type HeapAllocation
- type HeapTracker
- type Program
- type RTCTracker
- type ReadReaderAt
- type RunMode
- type Section
- type SourceLocation
- type Symbol
- type SymbolType
- type TouchGesture
Constants ¶
View Source
const ( DisplayWidth = C.PINETIME_LCD_WIDTH DisplayHeight = C.PINETIME_LCD_HEIGHT DisplayBytesPerPixel = C.BYTES_PER_PIXEL )
View Source
const ( PinCharging = 12 PinCst816sReset = 10 PinButton = 13 PinButtonEnable = 15 PinCst816sIrq = 28 PinPowerPresent = 19 PinBma421Irq = 8 PinMotor = 16 PinLcdBacklightLow = 14 PinLcdBacklightMedium = 22 PinLcdBacklightHigh = 23 PinSpiSck = 2 PinSpiMosi = 3 PinSpiMiso = 4 PinSpiFlashCsn = 5 PinSpiLcdCsn = 25 PinLcdDataCommand = 18 PinLcdReset = 26 PinTwiScl = 7 PinTwiSda = 6 )
View Source
const BaseFrequencyHZ = 64_000_000
Variables ¶
This section is empty.
Functions ¶
func ConvertImage ¶
Types ¶
type Brightness ¶
type Brightness int
const ( BrightnessOff Brightness = iota BrightnessLow BrightnessMedium BrightnessHigh BrightnessInvalid )
func (Brightness) String ¶
func (b Brightness) String() string
type Emulator ¶
type Emulator struct {
Heap *HeapTracker
// contains filtered or unexported fields
}
func (*Emulator) Brightness ¶
func (e *Emulator) Brightness() Brightness
func (*Emulator) CloseRunlog ¶
func (e *Emulator) CloseRunlog()
func (*Emulator) DidSPIFlashChange ¶
func (*Emulator) DisableHeapTracker ¶
func (e *Emulator) DisableHeapTracker()
func (*Emulator) DoTouch ¶
func (e *Emulator) DoTouch(gesture TouchGesture, x, y int)
func (*Emulator) EnableHeapTracker ¶
func (e *Emulator) EnableHeapTracker()
func (*Emulator) FindFreeHeapBlocks ¶
func (e *Emulator) FindFreeHeapBlocks()
func (*Emulator) InstructionsPerSecond ¶
func (*Emulator) IsDisplaySleeping ¶
func (*Emulator) RTCTrackers ¶
func (e *Emulator) RTCTrackers() []*RTCTracker
func (*Emulator) ReadDisplayBuffer ¶
func (*Emulator) ReadMemory ¶
func (*Emulator) ReadVariable ¶
func (*Emulator) RecordRunlog ¶
func (*Emulator) ReleaseTouch ¶
func (e *Emulator) ReleaseTouch()
func (*Emulator) RunIterations ¶
func (*Emulator) SetFrequency ¶
func (*Emulator) SetHeartrateValue ¶
type Function ¶
type FunctionDefinition ¶
type HeapTracker ¶
type HeapTracker struct {
// contains filtered or unexported fields
}
func (*HeapTracker) GetAll ¶
func (h *HeapTracker) GetAll() []HeapAllocation
func (*HeapTracker) GetBytes ¶
func (h *HeapTracker) GetBytes() []ByteState
func (*HeapTracker) GetInUse ¶
func (h *HeapTracker) GetInUse() []HeapAllocation
func (*HeapTracker) HeapSize ¶
func (h *HeapTracker) HeapSize() int
func (*HeapTracker) HeapStart ¶
func (h *HeapTracker) HeapStart() uint32
type Program ¶
type Program struct {
FilePath string // only used to allow GDB to load the program from disk and can thus be left empty
Sections []Section
Symbols map[string]Symbol
Functions map[string]*Function
}
func LoadProgram ¶
func LoadProgram(r ReadReaderAt) (*Program, error)
type RTCTracker ¶
type ReadReaderAt ¶
type ReadReaderAt interface {
io.ReaderAt
io.ReadSeeker
}
type SourceLocation ¶
type Symbol ¶
type Symbol struct {
Name, PrettyName string
Start, Length uint32
Type SymbolType
}
type SymbolType ¶
type SymbolType byte
const ( SymbolTypeObject SymbolType = iota + 1 SymbolTypeFunction )
type TouchGesture ¶
type TouchGesture int
const ( GestureNone TouchGesture = C.GESTURE_NONE GestureSlideDown TouchGesture = C.GESTURE_SLIDEDOWN GestureSlideUp TouchGesture = C.GESTURE_SLIDEUP GestureSlideLeft TouchGesture = C.GESTURE_SLIDELEFT GestureSlideRight TouchGesture = C.GESTURE_SLIDERIGHT GestureSingleTap TouchGesture = C.GESTURE_SINGLETAP GestureDoubleTap TouchGesture = C.GESTURE_DOUBLETAP GestureLongPress TouchGesture = C.GESTURE_LONGPRESS )
Click to show internal directories.
Click to hide internal directories.