21
21
#include < stdint.h>
22
22
#include " CirquePinnacle_common.h"
23
23
24
- /* * Defined constants for Pinnacle registers */
24
+ /* Defined constants for Pinnacle registers */
25
25
#define PINNACLE_FIRMWARE_ID 0x00
26
26
#define PINNACLE_STATUS 0x02
27
27
#define PINNACLE_SYS_CONFIG 0x03
@@ -167,9 +167,9 @@ enum PinnacleAnyMeasMuxing : uint8_t
167
167
enum PinnacleAnyMeasCtrl : uint8_t
168
168
{
169
169
/* * only required for more than 1 measurement */
170
- PINNACLE_CRTL_REPEAT = 0x80 ,
170
+ PINNACLE_CTRL_REPEAT = 0x80 ,
171
171
/* * triggers low power mode (sleep) after completing measurements */
172
- PINNACLE_CRTL_PWR_IDLE = 0x40 ,
172
+ PINNACLE_CTRL_PWR_IDLE = 0x40 ,
173
173
};
174
174
175
175
#endif // PINNACLE_ANYMEAS_SUPPORT == false
@@ -294,8 +294,8 @@ class PinnacleTouch
294
294
PinnacleTouch (pinnacle_gpio_t dataReadyPin);
295
295
/* *
296
296
* This function controls if the touch/button event data is reported or
297
- * not. It only applies to `PINNACLE_RELATIVE` or `PINNACLE_ABSOLUTE`
298
- * mode, otherwise if `setDataMode()` is given `PINNACLE_ANYMEAS`, then this
297
+ * not. It only applies to `~PinnacleDataMode:: PINNACLE_RELATIVE` or `~PinnacleDataMode:: PINNACLE_ABSOLUTE`
298
+ * mode, otherwise if `setDataMode()` is given `~PinnacleDataMode:: PINNACLE_ANYMEAS`, then this
299
299
* function will do nothing.
300
300
*
301
301
* @param isEnabled Enables (``true``) or disables (``false``) data reporting.
@@ -307,7 +307,7 @@ class PinnacleTouch
307
307
*
308
308
* @return
309
309
* The setting configured by `feedEnabled()` or ``false`` if `setDataMode()`
310
- * is given `PINNACLE_ANYMEAS`.
310
+ * is given `~PinnacleDataMode:: PINNACLE_ANYMEAS`.
311
311
*/
312
312
bool isFeedEnabled ();
313
313
/* *
@@ -318,9 +318,9 @@ class PinnacleTouch
318
318
* .. csv-table::
319
319
* :header: "``mode`` (enum value)", description
320
320
*
321
- * ":expr:` PINNACLE_RELATIVE` (``0``)", "for relative/mouse mode"
322
- * ":expr:` PINNACLE_ANYMEAS` (``1``)", "for reading raw ADC values"
323
- * ":expr:` PINNACLE_ABSOLUTE` (``2``)", "for absolute positioning mode"
321
+ * "`~PinnacleDataMode:: PINNACLE_RELATIVE` (``0``)", "for relative/mouse mode"
322
+ * "`~PinnacleDataMode:: PINNACLE_ANYMEAS` (``1``)", "for reading raw ADC values"
323
+ * "`~PinnacleDataMode:: PINNACLE_ABSOLUTE` (``2``)", "for absolute positioning mode"
324
324
*
325
325
* Invalid input values have no affect.
326
326
*/
@@ -329,16 +329,16 @@ class PinnacleTouch
329
329
* This function describes which mode for which kind of data to report.
330
330
*
331
331
* .. important::
332
- * When switching from `PINNACLE_ANYMEAS` to `PINNACLE_RELATIVE`
333
- * or `PINNACLE_ABSOLUTE` all configurations are reset, and must be
332
+ * When switching from `~PinnacleDataMode:: PINNACLE_ANYMEAS` to `~PinnacleDataMode:: PINNACLE_RELATIVE`
333
+ * or `~PinnacleDataMode:: PINNACLE_ABSOLUTE` all configurations are reset, and must be
334
334
* re-configured by using `absoluteModeConfig()` or `relativeModeConfig()`.
335
335
*
336
336
* @return
337
- * - :expr:` PINNACLE_RELATIVE` (``0``) for relative mode (AKA mouse mode)
338
- * - :expr:` PINNACLE_ANYMEAS` (``1``) for anymeas mode (raw ADC measurements)
339
- * - :expr:` PINNACLE_ABSOLUTE` (``2``) for absolute mode (X & Y axis
337
+ * - `~PinnacleDataMode:: PINNACLE_RELATIVE` (``0``) for relative mode (AKA mouse mode)
338
+ * - `~PinnacleDataMode:: PINNACLE_ANYMEAS` (``1``) for anymeas mode (raw ADC measurements)
339
+ * - `~PinnacleDataMode:: PINNACLE_ABSOLUTE` (``2``) for absolute mode (X & Y axis
340
340
* positions)
341
- * - :expr:` PINNACLE_ERROR` (``0xFF``) if `begin()` returns ``false`` (failed to
341
+ * - `~PinnacleDataMode:: PINNACLE_ERROR` (``0xFF``) if `begin()` returns ``false`` (failed to
342
342
* initialize the trackpad)
343
343
*/
344
344
PinnacleDataMode getDataMode ();
@@ -395,8 +395,8 @@ class PinnacleTouch
395
395
bool available ();
396
396
/* *
397
397
* Configure settings specific to Absolute mode (reports axis positions). This function only
398
- * applies to `PINNACLE_ABSOLUTE` mode, otherwise if `setDataMode()` is given
399
- * `PINNACLE_ANYMEAS` or `PINNACLE_RELATIVE`, then this function does nothing.
398
+ * applies to `~PinnacleDataMode:: PINNACLE_ABSOLUTE` mode, otherwise if `setDataMode()` is given
399
+ * `~PinnacleDataMode:: PINNACLE_ANYMEAS` or `~PinnacleDataMode:: PINNACLE_RELATIVE`, then this function does nothing.
400
400
*
401
401
* @param zIdleCount Specifies the number of empty packets (x-axis, y-axis, and z-axis
402
402
* are ``0``) reported (every 10 milliseconds) when there is no touch detected. Defaults
@@ -411,8 +411,8 @@ class PinnacleTouch
411
411
bool invertY = false );
412
412
/* *
413
413
* Configure settings specific to Relative mode (AKA Mouse mode) data reporting. This function
414
- * only applies to `PINNACLE_RELATIVE` mode, otherwise if `setDataMode()` is given
415
- * `PINNACLE_ANYMEAS` or `PINNACLE_ABSOLUTE`, then this function does nothing.
414
+ * only applies to `~PinnacleDataMode:: PINNACLE_RELATIVE` mode, otherwise if `setDataMode()` is given
415
+ * `~PinnacleDataMode:: PINNACLE_ANYMEAS` or `~PinnacleDataMode:: PINNACLE_ABSOLUTE`, then this function does nothing.
416
416
*
417
417
* @param taps Specifies if all taps should be reported (``true``) or not
418
418
* (``false``). Default is ``true``. This affects `secondaryTap` option as well.
@@ -434,9 +434,9 @@ class PinnacleTouch
434
434
bool glideExtend = false );
435
435
/* *
436
436
* This function will fetch touch (and button) event data from the
437
- * Pinnacle ASIC. This function only applies to `PINNACLE_RELATIVE` mode,
438
- * otherwise if `setDataMode()` is given `PINNACLE_ANYMEAS` or
439
- * `PINNACLE_ABSOLUTE`, then this function does nothing.
437
+ * Pinnacle ASIC. This function only applies to `~PinnacleDataMode:: PINNACLE_RELATIVE` mode,
438
+ * otherwise if `setDataMode()` is given `~PinnacleDataMode:: PINNACLE_ANYMEAS` or
439
+ * `~PinnacleDataMode:: PINNACLE_ABSOLUTE`, then this function does nothing.
440
440
*
441
441
* @param[out] report A reference pointer (declared variable of datatype
442
442
* `RelativeReport`) for storing the data that describes the touch (and
@@ -458,8 +458,8 @@ class PinnacleTouch
458
458
/* *
459
459
* This function will fetch touch (and button) event data from the
460
460
* Pinnacle ASIC (including empty packets on ending of a touch/button
461
- * event). This function only applies to `PINNACLE_ABSOLUTE` mode, otherwise
462
- * if `setDataMode()` is given `PINNACLE_ANYMEAS` or `PINNACLE_RELATIVE`,
461
+ * event). This function only applies to `~PinnacleDataMode:: PINNACLE_ABSOLUTE` mode, otherwise
462
+ * if `setDataMode()` is given `~PinnacleDataMode:: PINNACLE_ANYMEAS` or `~PinnacleDataMode:: PINNACLE_RELATIVE`,
463
463
* then this function does nothing.
464
464
*
465
465
* @param[out] report A reference pointer (declared variable of datatype
@@ -529,18 +529,23 @@ class PinnacleTouch
529
529
bool isShutdown ();
530
530
/* *
531
531
* This function controls how many samples (of data) per second are
532
- * taken. This function only applies to `PINNACLE_RELATIVE` or
533
- * `PINNACLE_ABSOLUTE` mode, otherwise if `setDataMode()` is given
534
- * `PINNACLE_ANYMEAS`, then this function will do nothing.
532
+ * taken. This function only applies to `~PinnacleDataMode:: PINNACLE_RELATIVE` or
533
+ * `~PinnacleDataMode:: PINNACLE_ABSOLUTE` mode, otherwise if `setDataMode()` is given
534
+ * `~PinnacleDataMode:: PINNACLE_ANYMEAS`, then this function will do nothing.
535
535
*
536
536
* @param value Valid input values are ``100``, ``80``, ``60``, ``40``, ``20``,
537
537
* ``10``. Any other input values automatically set the sample rate to 100
538
- * sps (samples per second). Optionally, ``200`` and ``300`` sps can be
538
+ * sps (samples per second).
539
+ *
540
+ * Optionally, on older trackpads, ``200`` and ``300`` sps can be
539
541
* specified, but using these optional values automatically disables palm
540
542
* (referred to as "NERD" in the specification sheet) and noise
541
543
* compensations. These higher values are meant for using a stylus with a
542
544
* 2mm diameter tip, while the values less than 200 are meant for a finger
543
545
* or stylus with a 5.25mm diameter tip.
546
+ *
547
+ * .. warning:: This method is |rev2025| Specifying the values ``200`` or ``300``
548
+ * |rev2025-no-effect| and will be clamped to ``100``.
544
549
*/
545
550
void setSampleRate (uint16_t value);
546
551
/* *
@@ -549,7 +554,7 @@ class PinnacleTouch
549
554
*
550
555
* :Return:
551
556
* The setting configured by `setSampleRate()` or ``0`` if `setDataMode()` is
552
- * given `PINNACLE_ANYMEAS`.
557
+ * given `~PinnacleDataMode:: PINNACLE_ANYMEAS`.
553
558
*/
554
559
uint16_t getSampleRate ();
555
560
/* *
@@ -559,6 +564,8 @@ class PinnacleTouch
559
564
* .. tip:: Consider adjusting the ADC matrix's gain to enhance
560
565
* performance/results using `setAdcGain()`.
561
566
*
567
+ * .. warning:: This method is |rev2025| Calling this method |rev2025-no-effect|.
568
+ *
562
569
* @param enableFinger ``true`` enables the Pinnacle ASIC's measurements to
563
570
* detect if the touch event was caused by a finger or 5.25mm stylus.
564
571
* ``false`` disables this feature. Default is ``true``.
@@ -573,9 +580,9 @@ class PinnacleTouch
573
580
uint16_t sampleRate = 100 );
574
581
/* *
575
582
* Set calibration parameters when the Pinnacle ASIC calibrates itself.
576
- * This function only applies to `PINNACLE_RELATIVE` or
577
- * `PINNACLE_ABSOLUTE` mode, otherwise if `setDataMode()` is given
578
- * `PINNACLE_ANYMEAS`, then this function will do nothing.
583
+ * This function only applies to `~PinnacleDataMode:: PINNACLE_RELATIVE` or
584
+ * `~PinnacleDataMode:: PINNACLE_ABSOLUTE` mode, otherwise if `setDataMode()` is given
585
+ * `~PinnacleDataMode:: PINNACLE_ANYMEAS`, then this function will do nothing.
579
586
*
580
587
* .. note:: According to the datasheet, calibration of the sensor takes about
581
588
* 100 milliseconds. This function will block until calibration is complete
@@ -594,10 +601,10 @@ class PinnacleTouch
594
601
* ``true``.
595
602
* @returns
596
603
* ``false``
597
- * - If `setDataMode()` is not set to `PINNACLE_RELATIVE` or `PINNACLE_ABSOLUTE`.
604
+ * - If `setDataMode()` is not set to `~PinnacleDataMode:: PINNACLE_RELATIVE` or `~PinnacleDataMode:: PINNACLE_ABSOLUTE`.
598
605
* - If the calibration `run` timed out after 100 milliseconds.
599
606
* ``true``
600
- * - If `setDataMode()` is not given `PINNACLE_RELATIVE` or `PINNACLE_ABSOLUTE` and the
607
+ * - If `setDataMode()` is not given `~PinnacleDataMode:: PINNACLE_RELATIVE` or `~PinnacleDataMode:: PINNACLE_ABSOLUTE` and the
601
608
* calibration is not `run`.
602
609
* - If the calibration `run` successfully finishes.
603
610
*/
@@ -609,7 +616,9 @@ class PinnacleTouch
609
616
/* *
610
617
* Manually sets the compensation matrix (array) of the 46 16-bit unsigned
611
618
* integer values stored in the Pinnacle ASIC's memory that is used for
612
- * taking measurements. This matrix is not applicable to `PINNACLE_ANYMEAS` mode.
619
+ * taking measurements. This matrix is not applicable to `~PinnacleDataMode::PINNACLE_ANYMEAS` mode.
620
+ *
621
+ * .. warning:: This method is |rev2025| Calling this method |rev2025-no-effect|.
613
622
*
614
623
* @param matrix The array of 16-bit unsigned integers that will be used
615
624
* for compensation calculations when measuring of input events.
@@ -626,6 +635,8 @@ class PinnacleTouch
626
635
* created internally by calling `calibrate()` with the ``run`` parameter as
627
636
* ``true``.
628
637
*
638
+ * .. warning:: This method is |rev2025| Calling this method |rev2025-no-effect|.
639
+ *
629
640
* .. hint:: A note from Cirque's Application Note on Comparing matrices:
630
641
*
631
642
* If any 16-bit values are above 20K (absolute), it generally
@@ -652,10 +663,12 @@ class PinnacleTouch
652
663
* Sets the ADC (Analog to Digital Converter) attenuation (gain ratio) to
653
664
* enhance performance based on the overlay type. This does not apply to
654
665
* AnyMeas mode. However, the input value specified can be written while
655
- * `setDataMode()` is given `PINNACLE_ANYMEAS`, but there is no guarantee that
666
+ * `setDataMode()` is given `~PinnacleDataMode:: PINNACLE_ANYMEAS`, but there is no guarantee that
656
667
* it will "stick" as it may be overridden by the Pinnacle ASIC
657
668
* (specification sheet does not imply either way).
658
669
*
670
+ * .. warning:: This method is |rev2025| Calling this method |rev2025-no-effect|.
671
+ *
659
672
* @param sensitivity This byte specifies how sensitive the ADC component
660
673
* is. It must be in range [0, 3]. Where ``0`` means most sensitive, and ``3``
661
674
* means least sensitive. A value outside this range will default to ``0``.
@@ -673,13 +686,15 @@ class PinnacleTouch
673
686
* documented memory map for the Pinnacle ASIC as this function directly
674
687
* alters values in the Pinnacle ASIC's memory. ALTER THESE PARAMETERS AT
675
688
* YOUR OWN RISK!
689
+ *
690
+ * .. warning:: This method is |rev2025| Calling this method |rev2025-no-effect|.
676
691
*/
677
692
void tuneEdgeSensitivity (uint8_t xAxisWideZMin = 4 , uint8_t yAxisWideZMin = 3 );
678
693
#if PINNACLE_ANYMEAS_SUPPORT
679
694
/* *
680
695
* This function configures the Pinnacle ASIC for taking raw ADC
681
696
* measurements. Be sure that `setDataMode()` is given
682
- * `PINNACLE_ANYMEAS` before calling this function otherwise it will do
697
+ * `~PinnacleDataMode:: PINNACLE_ANYMEAS` before calling this function otherwise it will do
683
698
* nothing.
684
699
*
685
700
* .. note:: The `apertureWidth` parameter has an inverse relationship/affect
@@ -705,8 +720,8 @@ class PinnacleTouch
705
720
* @param controlPowerCount Configure the Pinnacle to perform a number of
706
721
* measurements for each call to `measureAdc()`. Defaults to 1. Constants
707
722
* defined in `PinnacleAnyMeasCtrl` can be added (with ``+``) to specify if
708
- * sleep is allowed (`PINNACLE_CRTL_PWR_IDLE ` -- this is not default) or
709
- * if repetitive measurements is allowed (`PINNACLE_CRTL_REPEAT `) when
723
+ * sleep is allowed (`PINNACLE_CTRL_PWR_IDLE ` -- this is not default) or
724
+ * if repetitive measurements is allowed (`PINNACLE_CTRL_REPEAT `) when
710
725
* number of measurements is more than 1.
711
726
*
712
727
* .. warning:: There is no bounds checking on the number of measurements
@@ -729,12 +744,12 @@ class PinnacleTouch
729
744
*
730
745
* Internally, this function uses the non-blocking helper functions
731
746
* `startMeasureAdc()` and `getMeasureAdc()`, but blocks until ADC measurements are
732
- * completed. Be sure that `setDataMode()` is given `PINNACLE_ANYMEAS` before
747
+ * completed. Be sure that `setDataMode()` is given `~PinnacleDataMode:: PINNACLE_ANYMEAS` before
733
748
* calling this function otherwise it will do nothing and return ``0``.
734
749
*
735
750
* :Return:
736
751
* A signed short integer. If `setDataMode()` is not given
737
- * `PINNACLE_ANYMEAS`, then this function returns ``0`` and does nothing.
752
+ * `~PinnacleDataMode:: PINNACLE_ANYMEAS`, then this function returns ``0`` and does nothing.
738
753
* :4-byte Integer Format (for use as each parameter):
739
754
* Bits 29 and 28 represent the optional implementation of reference
740
755
* capacitors built into the Pinnacle ASIC. To use these capacitors, the
@@ -783,7 +798,7 @@ class PinnacleTouch
783
798
int16_t measureAdc (unsigned int bitsToToggle, unsigned int togglePolarity);
784
799
/* *
785
800
* A non-blocking function to instigate ADC measurements when the `setDataMode()` is given
786
- * `PINNACLE_ANYMEAS` mode. See parameters and table in `measureAdc()` as
801
+ * `~PinnacleDataMode:: PINNACLE_ANYMEAS` mode. See parameters and table in `measureAdc()` as
787
802
* this helper function's parameters are used exactly the same.
788
803
*/
789
804
void startMeasureAdc (unsigned int bitsToToggle, unsigned int togglePolarity);
@@ -795,8 +810,8 @@ class PinnacleTouch
795
810
*
796
811
* :Returns:
797
812
*
798
- * - A 16-bit integer if `setDataMode()` is given `PINNACLE_ANYMEAS`.
799
- * - ``0`` if `setDataMode()` is not given `PINNACLE_ANYMEAS`.
813
+ * - A 16-bit integer if `setDataMode()` is given `~PinnacleDataMode:: PINNACLE_ANYMEAS`.
814
+ * - ``0`` if `setDataMode()` is not given `~PinnacleDataMode:: PINNACLE_ANYMEAS`.
800
815
*/
801
816
int16_t getMeasureAdc ();
802
817
#endif // PINNACLE_ANYMEAS_SUPPORT == true
@@ -829,7 +844,7 @@ class PinnacleTouch
829
844
* - ``true`` if the Pinnacle ASIC was setup and configured properly (with data
830
845
* feed enabled using Relative mode).
831
846
* - ``false`` if the Pinnacle ASIC was unresponsive for some reason; all further
832
- * operations will be nullified by `setDataMode()` to `PINNACLE_ERROR` (``0xFF``) .
847
+ * operations will be nullified by `setDataMode()` to `~PinnacleDataMode:: PINNACLE_ERROR`.
833
848
*/
834
849
bool begin ();
835
850
};
0 commit comments