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: ExioMcp23s17RotaryEncoder.cpp
- Revision:
- 9:b0e9ec45a720
- Parent:
- 6:1b3511093630
- Child:
- 12:33706f4ace5c
--- a/ExioMcp23s17RotaryEncoder.cpp Wed Nov 02 11:00:22 2016 +0000
+++ b/ExioMcp23s17RotaryEncoder.cpp Fri Nov 04 12:19:01 2016 +0000
@@ -31,7 +31,7 @@
/**
* Create rotary encoder.
- * @param device
+ * @param _pDevice
* @param port
* @param pin1
* @param pin2
@@ -40,12 +40,12 @@
* @param val Default value.
*/
ExioMcp23s17RotaryEncoder::ExioMcp23s17RotaryEncoder(
- ExioMcp23s17& device, ExioPort port, int pin1_n, int pin2_n,
+ ExioMcp23s17* pDevice, ExioPort port, int pin1_n, int pin2_n,
int min, int max, int val)
: min(min), max(max), val(val)
{
- in1 = new ExioMcp23s17DigitalIn(device, port, pin1_n);
- in2 = new ExioMcp23s17DigitalIn(device, port, pin2_n);
+ in1 = new ExioMcp23s17DigitalIn( pDevice, port, pin1_n);
+ in2 = new ExioMcp23s17DigitalIn( pDevice, port, pin2_n);
in1->mode(PullUp);
in2->mode(PullUp);
ticker.attach_us(this, &ExioMcp23s17RotaryEncoder::func_ticker, 500);