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

📄 l_target.h

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

/*         File: l_target.h                                                 */
/*  Description: Target specific definitions for the hc08 microcontroller   */
/*                                                                          */
/****************************************************************************/

#ifndef __L_TARGET_H__
#define __L_TARGET_H__

#include <l_types.h>

typedef volatile unsigned char l_reg8;

typedef struct 
{
    l_u16 bit_time;
}l_uart_ram_descriptor;

typedef l_uart_ram_descriptor *l_uart_ram_descriptor_handle;


typedef const l_uart_ram_descriptor  l_uart_descriptor;
typedef l_uart_descriptor           *l_uart_descriptor_handle;

/* status register of the software uart */
extern l_u8 near status_register;
#define TX_EMPTY        (1<<0)
#define RX_FULL         (1<<1)
#define FRAMING_ERROR   (1<<2)
#define BT_MEASURE      (1<<3)
#define BT_RECALC       (1<<4)

/* LIN API function prototypes for master */
L_LIB_PREFIX l_bool l_hc08_swuart_ifc_m_connect (void);
L_LIB_PREFIX l_bool l_hc08_swuart_ifc_m_disconnect (void);
L_LIB_PREFIX void   l_hc08_swuart_ifc_m_init (void);
L_LIB_PREFIX l_u16  l_hc08_swuart_ifc_m_ioctl (l_ioctl_op op, void *pv);
L_LIB_PREFIX void   l_hc08_swuart_ifc_m_rx (void);
L_LIB_PREFIX void   l_hc08_swuart_ifc_m_tx (void);
L_LIB_PREFIX void   l_hc08_swuart_sch_set (l_schedule_handle sch, l_u8 ent);
L_LIB_PREFIX l_u8   l_hc08_swuart_sch_tick (void);
L_LIB_PREFIX void   l_hc08_swuart_ifc_m_goto_sleep (void);
L_LIB_PREFIX l_u16  l_hc08_swuart_ifc_m_read_status(void);

/* LIN API function prototypes for slave */
L_LIB_PREFIX l_bool l_hc08_swuart_ifc_s_connect (void);
L_LIB_PREFIX l_bool l_hc08_swuart_ifc_s_disconnect (void);
L_LIB_PREFIX void   l_hc08_swuart_ifc_s_init (void);
L_LIB_PREFIX l_u16  l_hc08_swuart_ifc_s_ioctl (l_ioctl_op op, void *pv);
L_LIB_PREFIX void   l_hc08_swuart_ifc_s_rx (void);
L_LIB_PREFIX void   l_hc08_swuart_ifc_s_tx (void);
L_LIB_PREFIX l_u16  l_hc08_swuart_ifc_s_read_status(void);
L_LIB_PREFIX void   l_hc08_swuart_ifc_s_wakeup(void);

/* LIN API function prototypes for master & slave */
L_LIB_PREFIX l_bool l_hc08_swuart_sys_init(void);
L_LIB_PREFIX void	l_hc08_swuart_bytes_wr( l_u8 skip, l_u8 count, const l_u8* const data, l_u8* dest);
L_LIB_PREFIX void	l_hc08_swuart_bytes_rd(l_u8 skip, l_u8 count, l_u8* const data, l_u8 *src);

/* LIN API functions for class 2 diagnostic */
L_LIB_PREFIX l_bool ld2_response_slave(l_bool success);
L_LIB_PREFIX l_bool ld2_header_slave(void);
L_LIB_PREFIX void   ld2_init_slave(void);
L_LIB_PREFIX l_u8   ld2_read_by_id(l_u8 rid);
L_LIB_PREFIX void   ld2_prepare_response(l_u8 length);
L_LIB_PREFIX l_bool ld2_accept_ids(l_u8ram_handle supp_ptr, l_u8ram_handle func_ptr);

L_LIB_PREFIX void   ld2_init_master(void);
L_LIB_PREFIX l_bool ld2_header_master(void);
L_LIB_PREFIX l_bool ld2_response_master(l_bool success);

#endif /* __L_TARGET_H__ */

⌨️ 快捷键说明

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