Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TeensyFlash ¶
func TeensyFlash(s *State)
TeensyFlash flashes Teensy boards. It opens the firmware file at the provided path, checks its integrity, wait for the keyboard to be in Flash mode, flashes it, and reboots the board.
Types ¶
type Device ¶
type Device struct { Model Model `json:"model"` // 0 - planck // 1 - ergodox // 2 - moonlander Bus int `json:"bus"` Port int `json:"port"` }
func ProbeDevices ¶
type FlashProgress ¶
type FlashProgress struct { Total int `json:"total"` // total of firmware bytes to send Sent int `json:"sent"` // total of bytes sent }
FlashProgress represents the current flashing state, it gets updated by the flashing methods.
type Model ¶
type Model int
The Model type encodes which type of keyboard is being flashed. Three associated constants are defined for this type: Planck, ErgoDox, and Moonlander
type State ¶
type State struct { AppVersion string `json:"appVersion"` Device Device `json:"device"` // The user selected usb device Devices []Device `json:"devices"` // The list of usb devices connected Step Step `json:"step"` // The current flashing process step FirmwarePath string `json:"firmwarePath"` // The firmware absolute Path selected by the user FlashProgress FlashProgress `json:"flashProgress"` // The Flashing state progress Logs []stateLog `json:"logs"` // Log object }
State represents the global state of the application
func (*State) CompleteFlash ¶
func (s *State) CompleteFlash()
func (*State) FlashFirmware ¶
func (s *State) FlashFirmware()
func (*State) ProbeDevices ¶
func (s *State) ProbeDevices()
func (*State) ResetState ¶
func (s *State) ResetState()
func (*State) SelectFirmwareWithData ¶
Click to show internal directories.
Click to hide internal directories.