Pacemaker code Implementation for SFWRENG 3K04

Dependencies:   mbed Queue mbed-rtos FXOS8700Q

Fork of Pacemaker by Eric dollar

SWFRENG 3K04 Project to design, develop, and document a functional pacemaker.

The project uses the Freescale K64F Microcontroller and C++ mbed library.

Committer:
noahzwiep
Date:
Thu Nov 17 04:03:25 2016 +0000
Revision:
16:08d5e5a3ee74
Child:
31:5e55042e025a
- Made change to hardware class that provides sensing pin; - Made dataStruct class in which there is multiple threading for grabbing queue data; - Made queue in datastruct to allow storage of data

Who changed what in which revision?

UserRevisionLine numberNew contents of line
noahzwiep 16:08d5e5a3ee74 1 #pragma once
noahzwiep 16:08d5e5a3ee74 2 #include "mbed.h"
noahzwiep 16:08d5e5a3ee74 3 #include "hardware.h"
noahzwiep 16:08d5e5a3ee74 4 #include "rtos.h"
noahzwiep 16:08d5e5a3ee74 5 #include "queue.h"
noahzwiep 16:08d5e5a3ee74 6
noahzwiep 16:08d5e5a3ee74 7 #define START_THREAD 1
noahzwiep 16:08d5e5a3ee74 8
noahzwiep 16:08d5e5a3ee74 9 class dataStruct{
noahzwiep 16:08d5e5a3ee74 10 public:
noahzwiep 16:08d5e5a3ee74 11 dataStruct(hardware*);
noahzwiep 16:08d5e5a3ee74 12 ~dataStruct();
noahzwiep 16:08d5e5a3ee74 13 queue getData();
noahzwiep 16:08d5e5a3ee74 14
noahzwiep 16:08d5e5a3ee74 15 private:
noahzwiep 16:08d5e5a3ee74 16 static const int N = 13;
noahzwiep 16:08d5e5a3ee74 17 double k_streamPeriod;
noahzwiep 16:08d5e5a3ee74 18 hardware* myHardware;
noahzwiep 16:08d5e5a3ee74 19 double streamValue;
noahzwiep 16:08d5e5a3ee74 20 queue myQueue;
noahzwiep 16:08d5e5a3ee74 21 static void threadStarter(void const *p);
noahzwiep 16:08d5e5a3ee74 22 void storeData();
noahzwiep 16:08d5e5a3ee74 23 Thread thread;
noahzwiep 16:08d5e5a3ee74 24
noahzwiep 16:08d5e5a3ee74 25 };