⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 target.c

📁 MC68HC908QY4 LIN-BUS源码(编译环境:CodeWarriorV3.1)
💻 C
字号:
/* ************************************************************************ *
 *                                                                          *
 *                  Volcano Communications technologies AB                  *
 *                            All rights reserved                           *
 *                                                                          *
 * ************************************************************************ */

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

#include <lin.h>
#include "target.h"


/* ************************************************************************ */
/* Perform initialisation of development system (if any)                    */
void init_environment(void)
{
  /* Empty */
}


/* ************************************************************************ */
/* Perform initialisation of target.                                        */
void init_target(void)
{
  OSCTRIM = 0x60;                        /* Internal Oscillator Trim Factor */
}


/* ************************************************************************ */
/* Restores interrupt level to the previous level, as indicated by the      */
/* input previous. On the hc08 family the interrupt level can only be       */
/* either "interrupts enabled" or "interrupts disabled".                    */
void l_sys_irq_restore(l_irqmask previous)
{
  if (previous)
  {
    asm sei;  /* interrupts disabled */
  }
  else
  {
    asm cli;  /* interrupts enabled */
  }
}


/* ************************************************************************ */
/* Disable interrupts, and return the previous value of the interrupt       */
/* level.                                                                   */
l_irqmask l_sys_irq_disable(void)
{
    l_irqmask x;
    x = __isflag_int_enabled();
    asm sei;  /* interrupts disabled */
    return(x);
}


/* ************************************************************************ */
/* Interrupt handler for reciving data                                      */
interrupt 5 void uart_0_rx_handler(void)
{
    uart_it_handler();
}

⌨️ 快捷键说明

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