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.
Diff: rotary_encoder.cpp
- Revision:
- 2:4580c3869b7b
- Parent:
- 0:caf1d0bc4b90
- Child:
- 7:3b51e2c660b6
diff -r 0b315dd1bbbf -r 4580c3869b7b rotary_encoder.cpp
--- a/rotary_encoder.cpp Fri Feb 26 05:30:53 2016 +0000
+++ b/rotary_encoder.cpp Fri Feb 26 16:08:52 2016 +0000
@@ -1,6 +1,8 @@
#include "mbed.h"
#include "rotary_encoder.hpp"
+namespace mbed_stl {
+
const size_t rotary_encoder::max_counts_ = 0xFFFF;
rotary_encoder::rotary_encoder(size_t resolution) :
@@ -10,3 +12,5 @@
float rotary_encoder::get_revol_num() const {
return static_cast<float>(get_counts()) / resolution_;
}
+
+} /* namespace mbed_stl */