📄 csl_spiclose.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_spiClose.c * * @brief File for functional layer of CSL API @a CSL_spiClose() * * Description * - The @a CSL_spiClose() function definition & it's associated functions * * Path: \\(CSLPATH)\\ipmodules\\spi\\src * * Modification 1 * - modified on: 15/12/2003 * - reason: created the sources * * Modification 2 * - modified on: 19/12/2003 * - reason: created better documentation * * Modification 3 * - modified on: 01/03/2004 * - reason: modified according to review comments * * Modification 4 * - modified on: 10/05/2004 * - reason: removed MIB from code & documentation * * Date 15th Dec, 2003 * Author Sumant S. NaikKhanvte *//* ============================================================================= * Revision History * =============== * 11-oct-2004 Hs updated code review comments * 10-sep-2004 Hs Updated function and documentation for CSL_spiclose. * - Removed the include file, csl_resource.h. * ============================================================================= */#include <csl_spi.h>/** ============================================================================ * @n@b CSL_spiClose * * @b Description * @n This function marks that CSL for the SPI instance is closed. * CSL for the SPI instance need to be reopened before using any * SPI CSL API. * * @b Arguments * @verbatim hSpi Handle to the SPI instance @endverbatim * * <b> Return Value </b> CSL_Status * @li CSL_SOK - SPI is closed * successfully * * @li CSL_ESYS_BADHANDLE - The handle passed is invalid * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n 1. The SPI CSL APIs can not be called until the SPI * CSL is reopened again using CSL_spiOpen() * * @b Modifies * @n None * * @b Example * @verbatim CSL_spiClose (hSpi); @endverbatim * =========================================================================== */#pragma CODE_SECTION (CSL_spiClose, ".text:csl_section:spi");CSL_Status CSL_spiClose ( CSL_SpiHandle hSpi){ CSL_Status status; if (hSpi != NULL) { hSpi->regs = (CSL_SpiRegsOvly)NULL; hSpi->perNum = (CSL_InstNum)-1; status = CSL_SOK; } else { status = CSL_ESYS_BADHANDLE; } return status;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -