ELEC350 - Team Q / Mbed OS Sampling_Data_into_buffer

Dependencies:   BME280 BMP280

Fork of Task690-mbed-os-FZ429ZI by University of Plymouth - Stages 1, 2 and 3

Committer:
osmith2
Date:
Sun Dec 10 20:17:31 2017 +0000
Revision:
5:cc1b9f5c27a0
Child:
6:c2299e3de428
First attempt at task 1. Reading LDR, temp, and pressure data into a 120 sample FIFO buffer, using threads.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
osmith2 5:cc1b9f5c27a0 1 #ifndef __BUFFER__
osmith2 5:cc1b9f5c27a0 2 #define __BUFFER__
osmith2 5:cc1b9f5c27a0 3
osmith2 5:cc1b9f5c27a0 4 #include "mbed.h"
osmith2 5:cc1b9f5c27a0 5
osmith2 5:cc1b9f5c27a0 6 //Size of the morse character buffer
osmith2 5:cc1b9f5c27a0 7 #define BUFFERSIZE 10 // CW specified 120 samples
osmith2 5:cc1b9f5c27a0 8
osmith2 5:cc1b9f5c27a0 9 extern Semaphore spaceAvailable;
osmith2 5:cc1b9f5c27a0 10 extern Semaphore samplesInBuffer;
osmith2 5:cc1b9f5c27a0 11 extern Mutex bufferLock;
osmith2 5:cc1b9f5c27a0 12
osmith2 5:cc1b9f5c27a0 13
osmith2 5:cc1b9f5c27a0 14 extern void addToBuffer(float c);
osmith2 5:cc1b9f5c27a0 15 extern float takeFromBuffer();
osmith2 5:cc1b9f5c27a0 16
osmith2 5:cc1b9f5c27a0 17
osmith2 5:cc1b9f5c27a0 18
osmith2 5:cc1b9f5c27a0 19
osmith2 5:cc1b9f5c27a0 20 #endif