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: capsense.h
- Revision:
- 2:d9745be6c253
- Parent:
- 1:40e5ac1119a6
diff -r 40e5ac1119a6 -r d9745be6c253 capsense.h --- a/capsense.h Tue Jul 12 13:02:25 2022 -0400 +++ b/capsense.h Thu Aug 04 15:14:29 2022 -0400 @@ -20,14 +20,15 @@ public: CapSense(PinName measure_pin, PinName square_pin); - bool toggle(); + void start(); + void reset(); bool try_measure(); - long read_measurement(); + uint32_t read_measurement(); private: DigitalOut square_wave; DigitalIn cap_sense_measure; Timer timer; - long last_measurement; + uint32_t last_measurement; bool measured_this_cycle; }; \ No newline at end of file