Import detect_device.[ch]