1;/*******************************************************************************
3;DMT Generated Driver Header File
7; @defgroup dmtdriver DMT Driver
9; @brief Assembly language optimized helper routines required for calibration
11; @skipline @version Firmware Driver Version 1.2.1
13; @skipline @version PLIB Version 1.1.0
15; @skipline Device : dsPIC33CH512MP506S1
17;*******************************************************************************/
20;/*******************************************************************************
21; Copyright (C) 2016 Microchip Technology Inc.
23; MICROCHIP SOFTWARE NOTICE AND DISCLAIMER: You may use this software, and any
24; derivatives created by any person or entity by or on your behalf, exclusively
25; with Microchip's products. Microchip and its licensors retain all ownership
26; and intellectual property rights in the accompanying software and in all
29; This software and any accompanying information is for suggestion only. It
30; does not modify Microchip's standard warranty for its products. You agree
31; that you are solely responsible for testing the software and determining its
32; suitability. Microchip has no obligation to modify, test, certify, or
33; support the software.
35; THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
36; EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED
37; WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR
38; PURPOSE APPLY TO THIS SOFTWARE, ITS INTERACTION WITH MICROCHIP'S PRODUCTS,
39; COMBINATION WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION.
41; IN NO EVENT, WILL MICROCHIP BE LIABLE, WHETHER IN CONTRACT, WARRANTY, TORT
42; (INCLUDING NEGLIGENCE OR BREACH OF STATUTORY DUTY), STRICT LIABILITY,
43; INDEMNITY, CONTRIBUTION, OR OTHERWISE, FOR ANY INDIRECT, SPECIAL, PUNITIVE,
44; EXEMPLARY, INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, FOR COST OR EXPENSE OF
45; ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWSOEVER CAUSED, EVEN IF
46; MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE.
47; TO THE FULLEST EXTENT ALLOWABLE BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
48; CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF
49; FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
51; MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE
53;*******************************************************************************/
57 * ;uint32_t DMT_CalibratedCounterGet(void);
58 * Gets the count of DMT counter just before calling CalibratedCounterGet function
61 * @return 32-bit (unsigned long) caliberated count
63 * Registers used: w0 w1 w2
67 .global _DMT_CounterGet
68 .global _DMT_CalibratedCounterGet
70 .type _DMT_CalibratedCounterGet, @function
73 _DMT_CalibratedCounterGet:
84 * ;void DMT_Calibrate(void);
85 * Calculates and stores offset value during DMT_CounterGet function call
87 * Registers used: w0 w1 w2
91 .global _DMT_CounterGet
92 .global _DMT_Calibrate
94 .type _DMT_Calibrate, @function
104 rcall _DMT_CounterGet