Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions adapter_sd.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ func DefaultAdapter() (*Adapter, error) {
return &defaultAdapter, nil
}

//go:extern __app_ram_base
var appRAMBase [0]uint32

// Enable configures the BLE stack. It must be called before any
// Bluetooth-related calls (unless otherwise indicated).
func (a *Adapter) Enable() error {
Expand All @@ -89,8 +92,7 @@ func (a *Adapter) Enable() error {
return Error(errCode)
}

appRAMBase := uint32(0x200039c0)
errCode = C.sd_ble_enable(&appRAMBase)
errCode = C.sd_ble_enable((*uint32)(unsafe.Pointer(&appRAMBase)))
if errCode != 0 {
return Error(errCode)
}
Expand Down