📄 csl_tmrgethwstatus.c
字号:
/* ============================================================================ * Copyright (c) Texas Instruments Inc 2002, 2003, 2004, 2005 * * Use of this software is controlled by the terms and conditions found in the * license agreement under which this software has been supplied. * =========================================================================== *//** @file csl_tmrGetHwStatus.c * * @brief File for functional layer of CSL API @a CSL_tmrGetHwStatus() * * Description * - The @a CSL_tmrGetHwStatus() function definition & it's associated * functions * * Path: \\(CSLPATH)\\ipmodules\\timer\\src *//* ============================================================================= * Revision History * =============== * 1-Sept-2004 HMM File Created. * ============================================================================= */#include <csl_tmr.h>#include <csl_tmrAux.h>/** ============================================================================ * @n@b CSL_tmrGetHwStatus * * @b Description * @n Gets the status of the different operations of TMR. * * @b Arguments * @verbatim hTmr Handle to the TMR instance query The query to this API of TMR which indicates the status to be returned. response Placeholder to return the status. @endverbatim * * <b> Return Value </b> CSL_Status * @li CSL_SOK - Status info return successful. * @li CSL_ESYS_BADHANDLE - Invalid handle * @li CSL_ESYS_INVPARAMS - Invalid parameter * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example * @verbatim Uint16 count = 0; CSL_Status status; status = CSL_tmrGetHwStatus(hTmr, CSL_TMR_QUERY_COUNT, &count); @endverbatim * ============================================================================ */#pragma CODE_SECTION (CSL_tmrGetHwStatus, ".text:csl_section:tmr");CSL_Status CSL_tmrGetHwStatus ( CSL_TmrHandle hTmr, CSL_TmrHwStatusQuery query, void *response){ CSL_Status status = CSL_SOK; if (hTmr == NULL) { return CSL_ESYS_BADHANDLE; } if (response == NULL) { return CSL_ESYS_INVPARAMS; } switch (query) { case CSL_TMR_QUERY_COUNT12: CSL_tmrGetTim12Count (hTmr, (Uint32 *)response); break; case CSL_TMR_QUERY_COUNT34: CSL_tmrGetTim34Count (hTmr, (Uint32 *)response); break; case CSL_TMR_QUERY_TSTAT12: *((CSL_TmrTstat *)response) = CSL_tmrGetTstat12Status (hTmr); break; case CSL_TMR_QUERY_TSTAT34: *((CSL_TmrTstat *)response) = CSL_tmrGetTstat34Status (hTmr); break; case CSL_TMR_QUERY_GPIO_DATA_TINP12: *((Bool *)response) = CSL_tmrGetTinp12Data (hTmr); break; case CSL_TMR_QUERY_GPIO_DATA_TOUTP12: *((Bool *)response) = CSL_tmrGetToutp12Data (hTmr); break; case CSL_TMR_QUERY_GPIO_DATA_TINP34: *((Bool *)response) = CSL_tmrGetTinp34Data (hTmr); break; case CSL_TMR_QUERY_GPIO_DATA_TOUTP34: *((Bool *)response) = CSL_tmrGetToutp34Data (hTmr); break; case CSL_TMR_QUERY_PID_NUMBER: CSL_tmrGetPid (hTmr, (CSL_TmrPidNumber *)response); break; default: status = CSL_ESYS_INVQUERY; } return status;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -