EE445M RTOS
Taken at the University of Texas Spring 2015
jitter.c
Go to the documentation of this file.
1 /* -*- mode: c; c-basic-offset: 4; -*- */
2 /* Created by Hershal Bhave and Eric Crosson 2015-02-28 */
3 /* Revision history: Look in Git FGT */
4 #include "jitter.h"
5 
6 void pidwork_init() {
7 
8  PIDWORK = 0;
9  HIGHEST_PIDWORK = 0;
10  LOWEST_PIDWORK = (uint32_t)(-1);
11  PIDWORK_IDX = 0;
12 
13 }
14 
16 
17  while(1) {
18  asm volatile("CPSID I");
19  ++PIDWORK;
20  asm volatile("CPSIE I");
21  }
22 }
23 
26 
27  while(1) {
28  if (PIDWORK != 0) {
29  if (HIGHEST_PIDWORK < PIDWORK) {
31  }
32  if (LOWEST_PIDWORK > PIDWORK) {
34  }
37  }
38  PIDWORK = 0;
39  }
40 }
void pidwork_init()
Definition: jitter.c:6
static volatile uint32_t PIDWORK_IDX
Definition: jitter.h:19
void pidwork_increment()
Definition: jitter.c:15
#define PIDWORK_BUFFER_SIZE
Definition: test-os.c:32
static volatile uint32_t PIDWORK
Definition: jitter.h:16
static volatile uint32_t LOWEST_PIDWORK
Definition: jitter.h:18
static volatile uint32_t PIDWORK_BUFFER[32]
Definition: jitter.h:20
static volatile uint32_t HIGHEST_PIDWORK
Definition: jitter.h:17
void pidwork_record()
Definition: jitter.c:25