Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions builder/sizes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ func TestBinarySize(t *testing.T) {
tests := []sizeTest{
// microcontrollers
{"hifive1b", "examples/echo", 3884, 280, 0, 2268},
{"microbit", "examples/serial", 2852, 360, 8, 2272},
{"wioterminal", "examples/pininterrupt", 7337, 1491, 116, 6912},
{"microbit", "examples/serial", 2844, 360, 8, 2272},
{"wioterminal", "examples/pininterrupt", 7349, 1491, 116, 6912},

// TODO: also check wasm. Right now this is difficult, because
// wasm binaries are run through wasm-opt and therefore the
Expand Down
3 changes: 3 additions & 0 deletions src/runtime/runtime_atsamd21.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ func nanosecondsToTicks(ns int64) timeUnit {
func sleepTicks(d timeUnit) {
for d != 0 {
ticks := uint32(d)
if d > 0xffff_ffff {
ticks = 0xffff_ffff
}
if !timerSleep(ticks) {
// Bail out early to handle a non-time interrupt.
return
Expand Down
3 changes: 3 additions & 0 deletions src/runtime/runtime_atsamd51.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ func nanosecondsToTicks(ns int64) timeUnit {
func sleepTicks(d timeUnit) {
for d != 0 {
ticks := uint32(d)
if d > 0xffff_ffff {
ticks = 0xffff_ffff
}
if !timerSleep(ticks) {
return
}
Expand Down
3 changes: 3 additions & 0 deletions src/runtime/runtime_nrf.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ func buffered() int {
func sleepTicks(d timeUnit) {
for d != 0 {
ticks := uint32(d) & 0x7fffff // 23 bits (to be on the safe side)
if d > 0x7fffff {
ticks = 0x7fffff
}
rtc_sleep(ticks)
d -= timeUnit(ticks)
}
Expand Down
3 changes: 3 additions & 0 deletions src/runtime/runtime_nrf52840.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ func buffered() int {
func sleepTicks(d timeUnit) {
for d != 0 {
ticks := uint32(d) & 0x7fffff // 23 bits (to be on the safe side)
if d > 0x7fffff {
ticks = 0x7fffff
}
rtc_sleep(ticks)
d -= timeUnit(ticks)
}
Expand Down
Loading