Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.h@0:e0a44db7e925, 2010-12-23 (annotated)
- Committer:
- iamjay
- Date:
- Thu Dec 23 15:03:51 2010 +0000
- Revision:
- 0:e0a44db7e925
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| iamjay | 0:e0a44db7e925 | 1 | #ifndef MAIN_H |
| iamjay | 0:e0a44db7e925 | 2 | #define MAIN_H |
| iamjay | 0:e0a44db7e925 | 3 | |
| iamjay | 0:e0a44db7e925 | 4 | #include "SerialBuffered.h" |
| iamjay | 0:e0a44db7e925 | 5 | |
| iamjay | 0:e0a44db7e925 | 6 | enum { |
| iamjay | 0:e0a44db7e925 | 7 | BUSPIRATE_MODE = 0, |
| iamjay | 0:e0a44db7e925 | 8 | BITBANG_MODE, |
| iamjay | 0:e0a44db7e925 | 9 | RAW_WIRE_MODE, |
| iamjay | 0:e0a44db7e925 | 10 | }; |
| iamjay | 0:e0a44db7e925 | 11 | |
| iamjay | 0:e0a44db7e925 | 12 | struct _bp_config { |
| iamjay | 0:e0a44db7e925 | 13 | unsigned char terminal_input[4096]; |
| iamjay | 0:e0a44db7e925 | 14 | }; |
| iamjay | 0:e0a44db7e925 | 15 | |
| iamjay | 0:e0a44db7e925 | 16 | struct _mode_config { |
| iamjay | 0:e0a44db7e925 | 17 | unsigned char speed; |
| iamjay | 0:e0a44db7e925 | 18 | unsigned char numbits; |
| iamjay | 0:e0a44db7e925 | 19 | unsigned char buf[16]; |
| iamjay | 0:e0a44db7e925 | 20 | unsigned char altAUX:1; |
| iamjay | 0:e0a44db7e925 | 21 | unsigned char periodicService:1; |
| iamjay | 0:e0a44db7e925 | 22 | unsigned char lsbEN:1; |
| iamjay | 0:e0a44db7e925 | 23 | unsigned char HiZ:1; |
| iamjay | 0:e0a44db7e925 | 24 | unsigned char int16:1; |
| iamjay | 0:e0a44db7e925 | 25 | }; |
| iamjay | 0:e0a44db7e925 | 26 | |
| iamjay | 0:e0a44db7e925 | 27 | extern Serial debug; |
| iamjay | 0:e0a44db7e925 | 28 | extern SerialBuffered bp; |
| iamjay | 0:e0a44db7e925 | 29 | |
| iamjay | 0:e0a44db7e925 | 30 | extern struct _bp_config bp_config; |
| iamjay | 0:e0a44db7e925 | 31 | extern struct _mode_config mode_config; |
| iamjay | 0:e0a44db7e925 | 32 | |
| iamjay | 0:e0a44db7e925 | 33 | extern DigitalInOut bp_mosi; |
| iamjay | 0:e0a44db7e925 | 34 | extern DigitalInOut bp_miso; |
| iamjay | 0:e0a44db7e925 | 35 | extern DigitalInOut bp_clk; |
| iamjay | 0:e0a44db7e925 | 36 | extern DigitalInOut bp_cs; |
| iamjay | 0:e0a44db7e925 | 37 | extern DigitalInOut bp_aux; |
| iamjay | 0:e0a44db7e925 | 38 | extern DigitalInOut bp_adc; |
| iamjay | 0:e0a44db7e925 | 39 | |
| iamjay | 0:e0a44db7e925 | 40 | extern unsigned char mode; |
| iamjay | 0:e0a44db7e925 | 41 | |
| iamjay | 0:e0a44db7e925 | 42 | #endif |