From 5c69ca17c9bd490b3cf64c015fce3bef1535721f Mon Sep 17 00:00:00 2001 From: z4yx Date: Thu, 12 Dec 2019 18:16:25 +0800 Subject: [PATCH] add SetAsDefault API --- set_default.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 set_default.go diff --git a/set_default.go b/set_default.go new file mode 100644 index 0000000..7cd025e --- /dev/null +++ b/set_default.go @@ -0,0 +1,11 @@ +package ykoath + +func (o *OATH) SetAsDefault(name string) error { + + _, err := o.send(0x00, 0x55, 0x00, 0x00, + write(0x71, []byte(name)), + ) + + return err + +}