Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 73 lines (62 sloc) 1.101 kb
e0cca567 »
2012-07-12 blinking fault numbers on the arduino LED is working
1 /*
2 * main.c
3 *
4 * Created on: Jul 12, 2012
5 * Author: Tyler
6 */
7
8 #include <util/delay.h>
c29a86a2 »
2012-07-12 preliminary uart support; stdout functional
9 #include <stdio.h>
6a8b6b4a »
2012-07-12 uart output buffering working ; stdout using output buffering
10 #include <avr/interrupt.h>
66963128 »
2012-07-20 moved command processing outside of ISR; started support for a commun…
11 #include <avr/sleep.h>
e0cca567 »
2012-07-12 blinking fault numbers on the arduino LED is working
12
66963128 »
2012-07-20 moved command processing outside of ISR; started support for a commun…
13 #include "config.h"
e0cca567 »
2012-07-12 blinking fault numbers on the arduino LED is working
14 #include "fault.h"
15 #include "led.h"
16 #include "ioport.h"
604ae76b »
2012-07-12 added first atomic queue code
17 #include "atomq.h"
c29a86a2 »
2012-07-12 preliminary uart support; stdout functional
18 #include "uart.h"
2374a209 »
2012-07-13 added in message sending support; stdout is being sent via messages
19 #include "message.h"
59ab516a »
2012-07-13 clock and timers added
20 #include "clock.h"
21 #include "command.h"
22 #include "timer.h"
66963128 »
2012-07-20 moved command processing outside of ISR; started support for a commun…
23 #include "session.h"
4e485671 »
2012-07-21 moved clock overflow message sending into user space ; added support …
24 #include "processor.h"
1edc70ba »
2012-07-21 added ADC support; added command to subscribe to ADC data - jitter is…
25 #include "adc.h"
a16eaa65 »
2012-07-29 Huge set of changes:
26 #include "pwm.h"
e0cca567 »
2012-07-12 blinking fault numbers on the arduino LED is working
27
28 void main_init(void) {
4e485671 »
2012-07-21 moved clock overflow message sending into user space ; added support …
29 processor_init();
e0cca567 »
2012-07-12 blinking fault numbers on the arduino LED is working
30 ioport_init();
31 led_init();
604ae76b »
2012-07-12 added first atomic queue code
32 fault_init();
33 atomq_init();
c29a86a2 »
2012-07-12 preliminary uart support; stdout functional
34 uart_init();
1edc70ba »
2012-07-21 added ADC support; added command to subscribe to ADC data - jitter is…
35 adc_init();
a16eaa65 »
2012-07-29 Huge set of changes:
36 pwm_init();
2374a209 »
2012-07-13 added in message sending support; stdout is being sent via messages
37 message_init();
59ab516a »
2012-07-13 clock and timers added
38 command_init();
39 clock_init();
40 timer_init();
66963128 »
2012-07-20 moved command processing outside of ISR; started support for a commun…
41 session_init();
e0cca567 »
2012-07-12 blinking fault numbers on the arduino LED is working
42 }
43
16a180ab »
2012-07-20 command processing moved out of ISR; sessions can begin and end; star…
44 void main_update_subsystems(void) {
45 command_update();
46 session_update();
47 }
48
49 void main_sleep(void) {
4e485671 »
2012-07-21 moved clock overflow message sending into user space ; added support …
50 processor_idle();
51
16a180ab »
2012-07-20 command processing moved out of ISR; sessions can begin and end; star…
52 sleep_enable();
53 sleep_cpu();
54 sleep_disable();
55 }
56
5a0119ce »
2012-07-13 fixed atomq storage stride bug
57 void main_run(void) {
2374a209 »
2012-07-13 added in message sending support; stdout is being sent via messages
58
66963128 »
2012-07-20 moved command processing outside of ISR; started support for a commun…
59 sei();
59ab516a »
2012-07-13 clock and timers added
60 clock_run();
61
2374a209 »
2012-07-13 added in message sending support; stdout is being sent via messages
62 while(1) {
16a180ab »
2012-07-20 command processing moved out of ISR; sessions can begin and end; star…
63 main_update_subsystems();
64 main_sleep();
2374a209 »
2012-07-13 added in message sending support; stdout is being sent via messages
65 }
5a0119ce »
2012-07-13 fixed atomq storage stride bug
66 }
c29a86a2 »
2012-07-12 preliminary uart support; stdout functional
67
5a0119ce »
2012-07-13 fixed atomq storage stride bug
68 int main(void) {
69 main_init();
70 main_run();
71 fault_fatal(FAULT_MAINLOOP_DID_EXIT);
e0cca567 »
2012-07-12 blinking fault numbers on the arduino LED is working
72 }
Something went wrong with that request. Please try again.