why not initialize speed to defaultSPISpeed, and then if b.speed > 0, set it to uint32(b.speed)