No changes
sample_hardware.hpp@8:df979097cc71, 2017-12-07 (annotated)
- Committer:
- noutram
- Date:
- Thu Dec 07 15:28:16 2017 +0000
- Revision:
- 8:df979097cc71
- Parent:
- 5:58ba1a6dbf60
Library for ELEC350 and ELEC351 2017
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
noutram | 0:6f9f2e93a0be | 1 | #ifndef __sample_hardware__ |
noutram | 0:6f9f2e93a0be | 2 | #define __sample_hardware__ |
noutram | 5:58ba1a6dbf60 | 3 | |
noutram | 5:58ba1a6dbf60 | 4 | //#define BME |
noutram | 5:58ba1a6dbf60 | 5 | #ifdef BME |
noutram | 5:58ba1a6dbf60 | 6 | #include "BME280.h" |
noutram | 5:58ba1a6dbf60 | 7 | #else |
noutram | 5:58ba1a6dbf60 | 8 | #include "BMP280.h" |
noutram | 5:58ba1a6dbf60 | 9 | #endif |
noutram | 8:df979097cc71 | 10 | #include "TextLCD.h" |
noutram | 8:df979097cc71 | 11 | #include "SDBlockDevice.h" |
noutram | 8:df979097cc71 | 12 | #include "FATFileSystem.h" |
noutram | 5:58ba1a6dbf60 | 13 | |
noutram | 4:d884f14069c6 | 14 | enum ELEC350_ERROR_CODE {OK, FATAL}; |
noutram | 4:d884f14069c6 | 15 | |
noutram | 0:6f9f2e93a0be | 16 | extern DigitalOut onBoardLED; |
noutram | 0:6f9f2e93a0be | 17 | extern DigitalOut redLED; |
noutram | 0:6f9f2e93a0be | 18 | extern DigitalOut yellowLED; |
noutram | 0:6f9f2e93a0be | 19 | extern DigitalOut greenLED; |
noutram | 0:6f9f2e93a0be | 20 | |
noutram | 0:6f9f2e93a0be | 21 | extern DigitalIn onBoardSwitch; |
noutram | 0:6f9f2e93a0be | 22 | extern DigitalIn SW1; |
noutram | 0:6f9f2e93a0be | 23 | extern DigitalIn SW2; |
noutram | 0:6f9f2e93a0be | 24 | //extern Serial pc; |
noutram | 1:3250ba797c16 | 25 | extern AnalogIn adcIn; |
noutram | 0:6f9f2e93a0be | 26 | |
noutram | 5:58ba1a6dbf60 | 27 | #ifdef BME |
noutram | 5:58ba1a6dbf60 | 28 | extern BME280 sensor; |
noutram | 5:58ba1a6dbf60 | 29 | #else |
noutram | 5:58ba1a6dbf60 | 30 | extern BMP280 sensor; |
noutram | 5:58ba1a6dbf60 | 31 | #endif |
noutram | 5:58ba1a6dbf60 | 32 | |
noutram | 8:df979097cc71 | 33 | extern TextLCD lcd; |
noutram | 8:df979097cc71 | 34 | extern SDBlockDevice sd; |
noutram | 8:df979097cc71 | 35 | |
noutram | 0:6f9f2e93a0be | 36 | extern void post(); |
noutram | 4:d884f14069c6 | 37 | extern void errorCode(ELEC350_ERROR_CODE err); |
noutram | 0:6f9f2e93a0be | 38 | |
noutram | 0:6f9f2e93a0be | 39 | #endif |