Dependents: serial_connected_mcu_nucleo rotary_encoder_mbed serial_connected_mcu_nucleo omuni_speed_pid ... more
Fork of rotary_encoder by
このライブラリは以下のプログラムに基いています https://developer.mbed.org/users/gregeric/code/Nucleo_Hello_Encoder/
rotary_encoder_base/rotary_encoder_base.hpp@10:684e1604e5ea, 2016-06-25 (annotated)
- Committer:
- inst
- Date:
- Sat Jun 25 05:40:31 2016 +0000
- Revision:
- 10:684e1604e5ea
- Parent:
- 9:d1e6284a13ab
add read() to rotary_encoder;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
inst | 7:3b51e2c660b6 | 1 | #ifndef INCLUDED_ROTARY_ENCODER_BASE_H |
inst | 7:3b51e2c660b6 | 2 | #define INCLUDED_ROTARY_ENCODER_BASE_H |
inst | 0:caf1d0bc4b90 | 3 | |
inst | 4:d07f58c46a79 | 4 | #include "mbed.h" |
inst | 0:caf1d0bc4b90 | 5 | #include "rotary_encoder.hpp" |
inst | 0:caf1d0bc4b90 | 6 | |
inst | 9:d1e6284a13ab | 7 | class rotary_encoder_base_impl; |
inst | 9:d1e6284a13ab | 8 | |
inst | 0:caf1d0bc4b90 | 9 | class rotary_encoder_base : public rotary_encoder { |
inst | 0:caf1d0bc4b90 | 10 | public: |
inst | 0:caf1d0bc4b90 | 11 | rotary_encoder_base(TIM_TypeDef* timer_type, |
inst | 0:caf1d0bc4b90 | 12 | uint32_t encoder_mode, |
inst | 0:caf1d0bc4b90 | 13 | size_t resolution); |
inst | 3:65021ea3fae5 | 14 | virtual ~rotary_encoder_base(); |
inst | 0:caf1d0bc4b90 | 15 | |
inst | 0:caf1d0bc4b90 | 16 | virtual int32_t get_counts() const; |
inst | 0:caf1d0bc4b90 | 17 | |
inst | 0:caf1d0bc4b90 | 18 | virtual void reset(); |
inst | 0:caf1d0bc4b90 | 19 | virtual void start(); |
inst | 0:caf1d0bc4b90 | 20 | virtual void stop(); |
inst | 0:caf1d0bc4b90 | 21 | |
inst | 0:caf1d0bc4b90 | 22 | protected: |
inst | 9:d1e6284a13ab | 23 | rotary_encoder_base_impl* encoder_; |
inst | 0:caf1d0bc4b90 | 24 | }; |
inst | 0:caf1d0bc4b90 | 25 | |
inst | 0:caf1d0bc4b90 | 26 | #endif |