Skip to content

Commit

Permalink
ninafw: store local address as MACAddress
Browse files Browse the repository at this point in the history
Signed-off-by: Xudong Zheng <[email protected]>
  • Loading branch information
xudongzheng committed Jan 19, 2024
1 parent bf647ec commit 1ed1821
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion adapter_ninafw.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (a *Adapter) Address() (MACAddress, error) {
return MACAddress{}, err
}

return MACAddress{MAC: makeAddress(a.hci.address)}, nil
return a.hci.address, nil
}

func newBLEStack(uart *machine.UART) (*hci, *att) {
Expand Down
4 changes: 2 additions & 2 deletions hci_ninafw.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ type hci struct {
softRTS machine.Pin
att *att
buf []byte
address [6]byte
address MACAddress
cmdCompleteOpcode uint16
cmdCompleteStatus uint8
cmdResponse []byte
Expand Down Expand Up @@ -240,7 +240,7 @@ func (h *hci) readBdAddr() error {
return err
}

copy(h.address[:], h.cmdResponse[:7])
copy(h.address.MAC[:], h.cmdResponse[:7])

return nil
}
Expand Down

0 comments on commit 1ed1821

Please sign in to comment.