Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stopwatch.cc File Reference
- #include <stdlib.h>
- #include <avr/io.h>
- #include <avr/interrupt.h>
- #include "rs232.h"
- #include "stl_us_timer.h"
- Defines
- 1#define BAUD_DIV 52
- Functions
- 2int main ()
- Detailed Description
- This program implements a timer with lap timing capabilities on our microprocessor Revisions
- 301-05-08 JRR Original file
- 404-03-08 JW/MR Completed code
- 504-03-10 JW/MR Commented code
- Definition in file stopwatch.cc.
- Define Documentation
- #define BAUD_DIV 52
- This is the baud rate divisor for the serial port. It should give 9600 baud for the CPU crystal speed in use; for example, 26 works for a 4MHz crystal
- Definition at line 23 of file stopwatch.cc.
- Referenced by main().
- Function Documentation
- int main ()
- The main function is the "entry point" of every C program, the one which runs first (after standard setup code has finished). For mechatronics programs, main() runs an infinite loop and never exits.
- Returns:
- Although a mechatronics program never returns (there's no OS to return to), we generally have to return something, such as zero, to keep the compiler happy
- Definition at line 34 of file stopwatch.cc.
- References BAUD_DIV, rs232::check_for_char(), endl, task_timer::get_time_now(), rs232::getchar(), time_stamp::set_time(), and task_timer::set_time().
Add Comment
Please, Sign In to add comment