Library of hardware declarations and utility functions for the ELEC350/1 Practicals and Coursework

Dependents:   ELEC351_v1 ELEC350-CWTEMPLATE-2017 ELEC350-CWTEMPLATE-2017 ELEC350-CWTEMPLATE-2018

Fork of ELEC350-Practicals-FZ429 by University of Plymouth - Stages 1, 2 and 3

sample_hardware.hpp

Committer:
noutram
Date:
2017-12-07
Revision:
8:df979097cc71
Parent:
5:58ba1a6dbf60

File content as of revision 8:df979097cc71:

#ifndef __sample_hardware__
#define __sample_hardware__

//#define BME
#ifdef BME
#include "BME280.h"
#else
#include "BMP280.h"
#endif
#include "TextLCD.h"
#include "SDBlockDevice.h"
#include "FATFileSystem.h"

enum ELEC350_ERROR_CODE {OK, FATAL};

extern DigitalOut onBoardLED;
extern DigitalOut redLED;
extern DigitalOut yellowLED;
extern DigitalOut greenLED;

extern DigitalIn  onBoardSwitch;
extern DigitalIn  SW1;
extern DigitalIn  SW2;
//extern Serial pc;
extern AnalogIn adcIn;

#ifdef BME
extern BME280 sensor;
#else
extern BMP280 sensor;
#endif

extern TextLCD lcd;
extern SDBlockDevice sd;

extern void post();
extern void errorCode(ELEC350_ERROR_CODE err);

#endif