2007-12-29 09:05:26 +08:00
|
|
|
/****************************************************************************
|
2009-12-14 23:46:55 +08:00
|
|
|
* arch/z80/include/irq.h
|
2007-12-29 09:05:26 +08:00
|
|
|
*
|
2021-03-29 00:04:41 +08:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2007-12-29 09:05:26 +08:00
|
|
|
*
|
2021-03-29 00:04:41 +08:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2007-12-29 09:05:26 +08:00
|
|
|
*
|
2021-03-29 00:04:41 +08:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2007-12-29 09:05:26 +08:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2020-04-06 05:00:04 +08:00
|
|
|
/* This file should never be included directly but, rather,
|
2007-12-29 09:05:26 +08:00
|
|
|
* only indirectly through nuttx/irq.h
|
|
|
|
*/
|
|
|
|
|
2009-12-14 23:46:55 +08:00
|
|
|
#ifndef __ARCH_Z80_INCLUDE_IRQ_H
|
|
|
|
#define __ARCH_Z80_INCLUDE_IRQ_H
|
2007-12-29 09:05:26 +08:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <nuttx/irq.h>
|
|
|
|
#include <arch/chip/irq.h>
|
|
|
|
|
2022-06-30 03:47:43 +08:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Function Prototypes
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#define EXTERN extern "C"
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#else
|
|
|
|
#define EXTERN extern
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Return the current value of the stack pointer */
|
|
|
|
|
|
|
|
uintptr_t up_getsp(void);
|
|
|
|
|
2024-03-12 18:03:39 +08:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: up_getusrpc
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#define up_getusrpc(regs) \
|
|
|
|
(((FAR chipreg_t *)((regs) ? (regs) : up_current_regs()))[XCPT_PC])
|
|
|
|
|
2022-06-30 03:47:43 +08:00
|
|
|
#undef EXTERN
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2009-12-14 23:46:55 +08:00
|
|
|
#endif /* __ARCH_Z80_INCLUDE_IRQ_H */
|