func NewHSM(serialPort string) *HSM {
	return &HSM{
		serialPort: serialPort,
	}
}
NewHSM creates a new instance of HSM, which allows you to talk to the HSM bootloader and
firmware.
package hsm
import (
	"io"
	"time"
	bb02bootloader "github.com/digitalbitbox/bitbox02-api-go/api/bootloader"
	"github.com/digitalbitbox/bitbox02-api-go/api/common"
	bb02firmware "github.com/digitalbitbox/bitbox02-api-go/api/firmware"
	"github.com/digitalbitbox/bitbox02-api-go/communication/usart"
	"github.com/digitalbitbox/bitbox02-api-go/util/errp"
	"github.com/digitalbitbox/bitbox02-api-go/util/semver"
	"github.com/tarm/serial"
)
const (
	firmwareCMD   = 0x80 + 0x40 + 0x01
	bootloaderCMD = 0x80 + 0x40 + 0x03
	bootTimeoutSeconds = 30
)
type HSM struct {
	serialPort string
}