* arch/misoc/src/lm32/lm32.h
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*
****************************************************************************/
#ifndef __ARCH_MISOC_SRC_LM32_LM32_H
#define __ARCH_MISOC_SRC_LM32_LM32_H
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <nuttx/compiler.h>
# include <nuttx/irq.h>
# include <sys/types.h>
# include <stdint.h>
#endif
* Pre-processor Definitions
****************************************************************************/
* only a referenced is passed to get the state from the TCB.
*/
#define misoc_savestate(regs) lm32_copystate(regs, up_current_regs())
#define up_copystate(rega,regb) lm32_copystate(rega, regb)
#define misoc_restorestate(regs) (up_set_current_regs(regs))
* and no other console device is specified, then a serial console is
* assumed.
*/
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
#else
# if defined(CONFIG_CONSOLE_SYSLOG)
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
# else
# define USE_SERIALDRIVER 1
# define USE_EARLYSERIALINIT 1
# endif
#endif
* Public Types
****************************************************************************/
* Public Data
****************************************************************************/
#ifndef __ASSEMBLY__
extern uint32_t g_idle_topstack;
* Inline Functions
****************************************************************************/
* Public Functions Prototypes
****************************************************************************/
void lm32_board_initialize(void);
void lm32_copystate(uint32_t *dest, uint32_t *src);
uint32_t *lm32_decodeirq(uint32_t intstat, uint32_t *regs);
uint32_t *lm32_doirq(int irq, uint32_t *regs);
int lm32_swint(int irq, void *context, void *arg);
void lm32_sigdeliver(void);
void lm32_flush_dcache(void);
void lm32_flush_icache(void);
#endif
#endif