1 /* 2 * Copyright 2022 NXP 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 #pragma once 17 18 #include <phNxpNciHal.h> 19 20 typedef enum { 21 SCREEN_OFF = 0, 22 SCREEN_ON, 23 ULPDET_OFF, 24 ULPDET_ON 25 } RefreshNfccPowerState; 26 27 /******************************************************************************* 28 ** 29 ** Function phNxpNciHal_startPowerTracker() 30 ** 31 ** Description Function to start power tracker feature. 32 ** 33 ** Parameters pollDuration - Poll duration in MS for fetching power data 34 ** from NFCC. 35 ** Returns NFCSTATUS_FAILED or NFCSTATUS_SUCCESS 36 *******************************************************************************/ 37 extern "C" NFCSTATUS phNxpNciHal_startPowerTracker(unsigned long pollDuration); 38 39 /******************************************************************************* 40 ** 41 ** Function phNxpNciHal_onRefreshNfccPowerState() 42 ** 43 ** Description Callback invoked internally by HAL whenever there is system 44 ** state change and power data needs to be refreshed. 45 ** 46 ** Parameters state - Can be SCREEN_OFF, SCREEN_ON, ULPDET_OFF, ULPDET_ON 47 ** Returns NFCSTATUS_FAILED or NFCSTATUS_SUCCESS 48 *******************************************************************************/ 49 extern "C" NFCSTATUS phNxpNciHal_onRefreshNfccPowerState( 50 RefreshNfccPowerState state); 51 52 /******************************************************************************* 53 ** 54 ** Function phNxpNciHal_stopPowerTracker() 55 ** 56 ** Description Function to stop power tracker feature. 57 ** 58 ** Parameters None 59 ** Returns NFCSTATUS_FAILED or NFCSTATUS_SUCCESS 60 *******************************************************************************/ 61 extern "C" NFCSTATUS phNxpNciHal_stopPowerTracker(); 62