Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: MAX34417_demo MAXREFDES1265 MAXREFDES1265
Fork of mbed-dev by
targets/TARGET_Maxim/TARGET_MAX32630/mxc/nvic_table.h@164:2e7515f8c45d, 2017-03-24 (annotated)
- Committer:
- switches
- Date:
- Fri Mar 24 15:15:13 2017 +0000
- Revision:
- 164:2e7515f8c45d
- Parent:
- 157:ff67d9f36b67
Added low level init to clear IO registers
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
<> | 157:ff67d9f36b67 | 1 | /** |
<> | 157:ff67d9f36b67 | 2 | * @file |
<> | 157:ff67d9f36b67 | 3 | * @brief NVIC utility function and type declarations. |
<> | 157:ff67d9f36b67 | 4 | */ |
<> | 157:ff67d9f36b67 | 5 | |
<> | 157:ff67d9f36b67 | 6 | /* **************************************************************************** |
<> | 157:ff67d9f36b67 | 7 | * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved. |
<> | 157:ff67d9f36b67 | 8 | * |
<> | 157:ff67d9f36b67 | 9 | * Permission is hereby granted, free of charge, to any person obtaining a |
<> | 157:ff67d9f36b67 | 10 | * copy of this software and associated documentation files (the "Software"), |
<> | 157:ff67d9f36b67 | 11 | * to deal in the Software without restriction, including without limitation |
<> | 157:ff67d9f36b67 | 12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
<> | 157:ff67d9f36b67 | 13 | * and/or sell copies of the Software, and to permit persons to whom the |
<> | 157:ff67d9f36b67 | 14 | * Software is furnished to do so, subject to the following conditions: |
<> | 157:ff67d9f36b67 | 15 | * |
<> | 157:ff67d9f36b67 | 16 | * The above copyright notice and this permission notice shall be included |
<> | 157:ff67d9f36b67 | 17 | * in all copies or substantial portions of the Software. |
<> | 157:ff67d9f36b67 | 18 | * |
<> | 157:ff67d9f36b67 | 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
<> | 157:ff67d9f36b67 | 20 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
<> | 157:ff67d9f36b67 | 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
<> | 157:ff67d9f36b67 | 22 | * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES |
<> | 157:ff67d9f36b67 | 23 | * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
<> | 157:ff67d9f36b67 | 24 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
<> | 157:ff67d9f36b67 | 25 | * OTHER DEALINGS IN THE SOFTWARE. |
<> | 157:ff67d9f36b67 | 26 | * |
<> | 157:ff67d9f36b67 | 27 | * Except as contained in this notice, the name of Maxim Integrated |
<> | 157:ff67d9f36b67 | 28 | * Products, Inc. shall not be used except as stated in the Maxim Integrated |
<> | 157:ff67d9f36b67 | 29 | * Products, Inc. Branding Policy. |
<> | 157:ff67d9f36b67 | 30 | * |
<> | 157:ff67d9f36b67 | 31 | * The mere transfer of this software does not imply any licenses |
<> | 157:ff67d9f36b67 | 32 | * of trade secrets, proprietary technology, copyrights, patents, |
<> | 157:ff67d9f36b67 | 33 | * trademarks, maskwork rights, or any other form of intellectual |
<> | 157:ff67d9f36b67 | 34 | * property whatsoever. Maxim Integrated Products, Inc. retains all |
<> | 157:ff67d9f36b67 | 35 | * ownership rights. |
<> | 157:ff67d9f36b67 | 36 | * |
<> | 157:ff67d9f36b67 | 37 | * $Date: 2016-09-09 12:24:40 -0500 (Fri, 09 Sep 2016) $ |
<> | 157:ff67d9f36b67 | 38 | * $Revision: 24344 $ |
<> | 157:ff67d9f36b67 | 39 | * |
<> | 157:ff67d9f36b67 | 40 | *************************************************************************** */ |
<> | 157:ff67d9f36b67 | 41 | |
<> | 157:ff67d9f36b67 | 42 | /* Define to prevent redundant inclusion */ |
<> | 157:ff67d9f36b67 | 43 | #ifndef _NVIC_TABLE_H |
<> | 157:ff67d9f36b67 | 44 | #define _NVIC_TABLE_H |
<> | 157:ff67d9f36b67 | 45 | |
<> | 157:ff67d9f36b67 | 46 | #ifdef __cplusplus |
<> | 157:ff67d9f36b67 | 47 | extern "C" { |
<> | 157:ff67d9f36b67 | 48 | #endif |
<> | 157:ff67d9f36b67 | 49 | |
<> | 157:ff67d9f36b67 | 50 | /** |
<> | 157:ff67d9f36b67 | 51 | * @defgroup mxc_nvic NVIC Functions |
<> | 157:ff67d9f36b67 | 52 | * @ingroup sysconfig |
<> | 157:ff67d9f36b67 | 53 | * @brief Utility function for setting an IRQ handler dynamically |
<> | 157:ff67d9f36b67 | 54 | * @{ |
<> | 157:ff67d9f36b67 | 55 | */ |
<> | 157:ff67d9f36b67 | 56 | |
<> | 157:ff67d9f36b67 | 57 | /** |
<> | 157:ff67d9f36b67 | 58 | * @brief Type alias for an IRQ handler. |
<> | 157:ff67d9f36b67 | 59 | * @details Type alias for an IRQ handler function with prototype:. |
<> | 157:ff67d9f36b67 | 60 | * @code |
<> | 157:ff67d9f36b67 | 61 | * void irq_handler(void); |
<> | 157:ff67d9f36b67 | 62 | * @endcode |
<> | 157:ff67d9f36b67 | 63 | * |
<> | 157:ff67d9f36b67 | 64 | */ |
<> | 157:ff67d9f36b67 | 65 | typedef void (*irq_fn)(void); |
<> | 157:ff67d9f36b67 | 66 | |
<> | 157:ff67d9f36b67 | 67 | /** |
<> | 157:ff67d9f36b67 | 68 | * @brief Set an IRQ hander function for an IRQ specified by @p irqn. |
<> | 157:ff67d9f36b67 | 69 | * @details If the IRQ table is in flash, this function will copy the IRQ table to RAM. |
<> | 157:ff67d9f36b67 | 70 | * |
<> | 157:ff67d9f36b67 | 71 | * @param irqn ARM external IRQ number, see #IRQn_Type |
<> | 157:ff67d9f36b67 | 72 | * @param irq_handler Function to be called at IRQ context |
<> | 157:ff67d9f36b67 | 73 | */ |
<> | 157:ff67d9f36b67 | 74 | int NVIC_SetVector(IRQn_Type irqn, irq_fn irq_handler); |
<> | 157:ff67d9f36b67 | 75 | |
<> | 157:ff67d9f36b67 | 76 | /** |
<> | 157:ff67d9f36b67 | 77 | * @brief Copy NVIC vector table to RAM and set NVIC to RAM based table. |
<> | 157:ff67d9f36b67 | 78 | * |
<> | 157:ff67d9f36b67 | 79 | */ |
<> | 157:ff67d9f36b67 | 80 | void NVIC_SetRAM(void); |
<> | 157:ff67d9f36b67 | 81 | |
<> | 157:ff67d9f36b67 | 82 | /**@} end of group mxc_nvic */ |
<> | 157:ff67d9f36b67 | 83 | |
<> | 157:ff67d9f36b67 | 84 | #ifdef __cplusplus |
<> | 157:ff67d9f36b67 | 85 | } |
<> | 157:ff67d9f36b67 | 86 | #endif |
<> | 157:ff67d9f36b67 | 87 | |
<> | 157:ff67d9f36b67 | 88 | #endif /* _NVIC_TABLE_H */ |