| 35 | #include <unistd.h> |
| 36 | |
| 37 | void usage(void) |
| 38 | { |
| 39 | fprintf(stderr, "Usage: teensy_loader_cli -mmcu=<MCU> [-w] [-h] [-n] [-v] <file.hex>\n"); |
| 40 | fprintf(stderr, "\t-w : Wait for device to appear\n"); |
| 41 | fprintf(stderr, "\t-r : Use hard reboot if device not online\n"); |
| 42 | fprintf(stderr, "\t-n : No reboot after programming\n"); |
| 43 | fprintf(stderr, "\t-v : Verbose output\n"); |
| 44 | #if defined(USE_LIBUSB) |
| 45 | fprintf(stderr, "\n<MCU> = atmega32u4 | at90usb162 | at90usb646 | at90usb1286 | mk20dx128 | mk20dx256\n"); |
| 46 | #else |
| 47 | fprintf(stderr, "\n<MCU> = atmega32u4 | at90usb162 | at90usb646 | at90usb1286\n"); |
| 48 | #endif |
| 49 | fprintf(stderr, "\nFor more information, please visit:\n"); |
| 50 | fprintf(stderr, "http://www.pjrc.com/teensy/loader_cli.html\n"); |
| 51 | exit(1); |
| 52 | } |
| 53 | |
| 54 | // USB Access Functions |
| 55 | int teensy_open(void); |
no outgoing calls
no test coverage detected
searching dependent graphs…