Project

General

Profile

Revision 1479

Added by John Sexton over 14 years ago

Set up scheduler.c/.h files with headers comments.

View differences:

trunk/code/projects/scheduler/scheduler.c
1
#include <dragonfly_lib.h>
1
/**
2
 * @file scheduler.c
3
 * @brief Scheduler
4
 *
5
 * Implementation of functions for scheduler
6
 *
7
 * @author Colony Project, CMU Robotics Club
8
 **/
2 9

  
3
int main(void)
4
{
5

  
6
	/* initialize components, set wireless channel */
7
	dragonfly_init(ALL_ON);
8
	
9
	int val;
10

  
11
	while (1) {
12

  
13
		usb_puts("Val: ");
14
		bom_refresh(BOM_ALL);
15
		usb_puti(bom_get_max());
16

  
17
		usb_putc('\n');
18

  
19
		delay_ms(200);
20

  
21
	}
22

  
23
	return 0;
24
}
25

  
10
#include "scheduler.h"
trunk/code/projects/scheduler/scheduler.h
1
#include <dragonfly_lib.h>
1
/**
2
 * @file scheduler.h
3
 * @brief Contains scheduler declarations and functions
4
 *
5
 * Contains functions and definitions to implement a timer-based
6
 * scheduler and register tasks with the scheduler.
7
 *
8
 * @author Colony Project, CMU Robotics Club
9
 *
10
 **/
2 11

  
3
int main(void)
4
{
12
#ifndef _SCHEDULER_H_
13
#define _SCHEDULER_H_
5 14

  
6
	/* initialize components, set wireless channel */
7
	dragonfly_init(ALL_ON);
8
	
9
	int val;
10 15

  
11
	while (1) {
12 16

  
13
		usb_puts("Val: ");
14
		bom_refresh(BOM_ALL);
15
		usb_puti(bom_get_max());
16

  
17
		usb_putc('\n');
18

  
19
		delay_ms(200);
20

  
21
	}
22

  
23
	return 0;
24
}
25

  
17
#endif
trunk/code/projects/scheduler/main.c
1 1
#include <dragonfly_lib.h>
2
#include "scheduler.h"
2 3

  
3 4
int main(void)
4 5
{

Also available in: Unified diff