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 SCP1000 by
Diff: SCP1000.cpp
- Revision:
- 6:70e36f2da425
- Parent:
- 5:8e06eb237dd2
- Child:
- 7:61d2e698d988
diff -r 8e06eb237dd2 -r 70e36f2da425 SCP1000.cpp --- a/SCP1000.cpp Tue Oct 05 20:02:42 2010 +0000 +++ b/SCP1000.cpp Tue Oct 05 20:04:30 2010 +0000 @@ -1,3 +1,7 @@ +/** \file + SCP1000 cpp file +*/ + #include "SCP1000.h" SCP1000::SCP1000(PinName mosi, PinName miso, PinName sclk, PinName cs) @@ -17,6 +21,11 @@ wait(0.5); } +///Reads the pressure +/** + Reads the pressure from the sensor + @return Pressure in pascals. +*/ unsigned long SCP1000::readPressure() { unsigned long pressure_msb = read_register(PRESSURE); pressure_msb &= 0x07;