/* * SPDX-FileCopyrightText: 2015-2019 Cadence Design Systems, Inc. * * SPDX-License-Identifier: MIT * * SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD *//* ... *//*******************************************************************************Copyright (c) 2006-2015 Cadence Design Systems Inc.Permission is hereby granted, free of charge, to any person obtaininga copy of this software and associated documentation files (the"Software"), to deal in the Software without restriction, includingwithout limitation the rights to use, copy, modify, merge, publish,distribute, sublicense, and/or sell copies of the Software, and topermit persons to whom the Software is furnished to do so, subject tothe following conditions:The above copyright notice and this permission notice shall be includedin all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANYCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THESOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.******************************************************************************//* ... *//****************************************************************************** Xtensa-specific API for RTOS ports.******************************************************************************//* ... */#ifndef__XTENSA_API_H__#define__XTENSA_API_H__#include<stdbool.h>#include<xtensa/hal.h>#include"xtensa_context.h"/* Typedef for C-callable interrupt handler function */typedefvoid(*xt_handler)(void*);/* Typedef for C-callable exception handler function */typedefvoid(*xt_exc_handler)(XtExcFrame*);/*------------------------------------------------------------------------------- Call this function to set a handler for the specified exception. The handler will be installed on the core that calls this function. n - Exception number (type) f - Handler function address, NULL to uninstall handler. The handler will be passed a pointer to the exception frame, which is created on the stack of the thread that caused the exception. If the handler returns, the thread context will be restored and the faulting instruction will be retried. Any values in the exception frame that are modified by the handler will be restored as part of the context. For details of the exception frame structure see xtensa_context.h.-------------------------------------------------------------------------------*//* ... */externxt_exc_handlerxt_set_exception_handler(intn,xt_exc_handlerf);/*------------------------------------------------------------------------------- Call this function to set a handler for the specified interrupt. The handler will be installed on the core that calls this function. n - Interrupt number. f - Handler function address, NULL to uninstall handler. arg - Argument to be passed to handler.-------------------------------------------------------------------------------*//* ... */externxt_handlerxt_set_interrupt_handler(intn,xt_handlerf,void*arg);/*------------------------------------------------------------------------------- Call this function to enable the specified interrupts on the core that runs this code. mask - Bit mask of interrupts to be enabled.-------------------------------------------------------------------------------*//* ... */externvoidxt_ints_on(unsignedintmask);/*------------------------------------------------------------------------------- Call this function to disable the specified interrupts on the core that runs this code. mask - Bit mask of interrupts to be disabled.-------------------------------------------------------------------------------*//* ... */externvoidxt_ints_off(unsignedintmask);/*------------------------------------------------------------------------------- Call this function to set the specified (s/w) interrupt.-------------------------------------------------------------------------------*//* ... */staticinlinevoidxt_set_intset(unsignedintarg){xthal_set_intset(arg);}{ ... }/*------------------------------------------------------------------------------- Call this function to clear the specified (s/w or edge-triggered) interrupt.-------------------------------------------------------------------------------*//* ... */staticinlinevoidxt_set_intclear(unsignedintarg){xthal_set_intclear(arg);}{ ... }/*------------------------------------------------------------------------------- Call this function to get handler's argument for the specified interrupt. n - Interrupt number.-------------------------------------------------------------------------------*//* ... */externvoid*xt_get_interrupt_handler_arg(intn);/*------------------------------------------------------------------------------- Call this function to check if the specified interrupt is free to use. intr - Interrupt number. cpu - cpu number.-------------------------------------------------------------------------------*//* ... */boolxt_int_has_handler(intintr,intcpu);/* ... */#endif/* __XTENSA_API_H__ */
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.