target.h

来自「MC68HC908QY4 LIN-BUS源码(编译环境:CodeWarriorV」· C头文件 代码 · 共 62 行

H
62
字号
/* ************************************************************************ *
 *                                                                          *
 *                  Volcano Communications technologies AB                  *
 *                            All rights reserved                           *
 *                                                                          *
 * ************************************************************************ */

/* ************************************************************************ *
 *         File: target.h                                                   *
 *  Description: Target specific definitions/structures for the Hiware      *
 *               HC08 SWUART                                                *
 *               LTP example application                                    *
 *                                                                          *
 * ************************************************************************ */

#ifndef __TARGET_H__
#define __TARGET_H__

#include <MC68HC908QY4.h>

typedef volatile unsigned char creg_u8;

#define COP COPCTL                                             /* # Watch dog */
#define PET_WATCHDOG()  (COP = (l_u8)0)            /* Reset Watch dog counter */

/* ************************************************************************
 * This is a target dependent macro that should enable interrupts. Using
 * v_sys_irq_restore() is just one way of doing it, which works for this 
 * target.
 */
#define ENABLE_INTS()   l_sys_irq_restore((l_irqmask)0)
#define DISABLE_INTS()  l_sys_irq_disable()

/* Function prototypes */

/* ************************************************************************
 * Perform initialisation of development system                             
 */
extern void init_environment (void);


/* ************************************************************************
 * Perform initialisation of target.
 */
void init_target (void);


/* ************************************************************************
 * Restores interrupt level to the previous level, as indicated by the in-
 * put previous. On the CPU12 family the interrupt level can only be either
 * "interrupts enabled" or "interrupts disabled".
 */
void l_sys_irq_restore (l_irqmask previous);
                        

/* ************************************************************************
 * Disable interrupts, and return the previous value of the interrupt
 * level.
 */
l_irqmask l_sys_irq_disable(void);

#endif /* __TARGET_H__ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?