Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ELEC351 by
sample_hardware.hpp@37:7c4d7f206039, 2018-01-07 (annotated)
- Committer:
- thomasmorris
- Date:
- Sun Jan 07 19:21:11 2018 +0000
- Revision:
- 37:7c4d7f206039
- Child:
- 41:859b5e1e3d9a
Working Revision network working;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thomasmorris | 37:7c4d7f206039 | 1 | #ifndef __sample_hardware__ |
thomasmorris | 37:7c4d7f206039 | 2 | #define __sample_hardware__ |
thomasmorris | 37:7c4d7f206039 | 3 | //#define BME |
thomasmorris | 37:7c4d7f206039 | 4 | #ifdef BME |
thomasmorris | 37:7c4d7f206039 | 5 | #include "BME280.h" |
thomasmorris | 37:7c4d7f206039 | 6 | #else |
thomasmorris | 37:7c4d7f206039 | 7 | #include "BMP280.h" |
thomasmorris | 37:7c4d7f206039 | 8 | #endif |
thomasmorris | 37:7c4d7f206039 | 9 | #include "SDBlockDevice.h" |
thomasmorris | 37:7c4d7f206039 | 10 | #include "FATFileSystem.h" |
thomasmorris | 37:7c4d7f206039 | 11 | #include "LCD.hpp" |
thomasmorris | 37:7c4d7f206039 | 12 | |
thomasmorris | 37:7c4d7f206039 | 13 | enum ELEC350_ERROR_CODE {OK, FATAL}; |
thomasmorris | 37:7c4d7f206039 | 14 | |
thomasmorris | 37:7c4d7f206039 | 15 | extern DigitalOut onBoardLED; |
thomasmorris | 37:7c4d7f206039 | 16 | extern DigitalOut redLED; |
thomasmorris | 37:7c4d7f206039 | 17 | extern DigitalOut yellowLED; |
thomasmorris | 37:7c4d7f206039 | 18 | extern DigitalOut greenLED; |
thomasmorris | 37:7c4d7f206039 | 19 | |
thomasmorris | 37:7c4d7f206039 | 20 | extern DigitalIn onBoardSwitch; |
thomasmorris | 37:7c4d7f206039 | 21 | extern InterruptIn SW1; |
thomasmorris | 37:7c4d7f206039 | 22 | extern InterruptIn SW2; |
thomasmorris | 37:7c4d7f206039 | 23 | //extern Serial pc; |
thomasmorris | 37:7c4d7f206039 | 24 | extern AnalogIn adcIn; |
thomasmorris | 37:7c4d7f206039 | 25 | |
thomasmorris | 37:7c4d7f206039 | 26 | #ifdef BME |
thomasmorris | 37:7c4d7f206039 | 27 | extern BME280 sensor; |
thomasmorris | 37:7c4d7f206039 | 28 | #else |
thomasmorris | 37:7c4d7f206039 | 29 | extern BMP280 sensor; |
thomasmorris | 37:7c4d7f206039 | 30 | #endif |
thomasmorris | 37:7c4d7f206039 | 31 | extern SDBlockDevice sd; |
thomasmorris | 37:7c4d7f206039 | 32 | |
thomasmorris | 37:7c4d7f206039 | 33 | extern void post(); |
thomasmorris | 37:7c4d7f206039 | 34 | extern void errorCode(ELEC350_ERROR_CODE err); |
thomasmorris | 37:7c4d7f206039 | 35 | |
thomasmorris | 37:7c4d7f206039 | 36 | #endif |