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

📄 owire_priv.h

📁 freescale i.mx31 BSP CE5.0全部源码
💻 H
字号:
//------------------------------------------------------------------------------
//
//  Copyright (C) 2004, Freescale Semiconductor, Inc. All Rights Reserved
//  THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
//  BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
//  Freescale Semiconductor, Inc.
//
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
//
//  File:  owire_priv.h
//
//  Private definitions for One-Wire Driver
//
//------------------------------------------------------------------------------

#ifndef __OWIRE_PRIV_H__
#define __OWIRE_PRIV_H__

//------------------------------------------------------------------------------
// Defines

#define OWIRE_FUNCTION_ENTRY() \
    DEBUGMSG(ZONE_FUNCTION, (TEXT("++%s\r\n"), __WFUNCTION__))
#define OWIRE_FUNCTION_EXIT() \
    DEBUGMSG(ZONE_FUNCTION, (TEXT("--%s\r\n"), __WFUNCTION__))

#ifdef DEBUG
// Debug zone bit positions
#define ZONEID_INIT         0
#define ZONEID_DEINIT       1
#define ZONEID_IOCTL        2
#define ZONEID_READWRITE    3

#define ZONEID_INFO         12
#define ZONEID_FUNCTION     13
#define ZONEID_WARN         14
#define ZONEID_ERROR        15

// Debug zone masks
#define ZONEMASK_INIT       (1<<ZONEID_INIT)
#define ZONEMASK_DEINIT     (1<<ZONEID_DEINIT)
#define ZONEMASK_IOCTL      (1<<ZONEID_IOCTL)
#define ZONEMASK_READWRITE  (1<<ZONEID_READWRITE)

#define ZONEMASK_INFO       (1<<ZONEID_INFO)
#define ZONEMASK_FUNCTION   (1<<ZONEID_FUNCTION)
#define ZONEMASK_WARN       (1<<ZONEID_WARN)
#define ZONEMASK_ERROR      (1<<ZONEID_ERROR)

// Debug zone args to DEBUGMSG
#define ZONE_INIT           DEBUGZONE(ZONEID_INIT)
#define ZONE_DEINIT         DEBUGZONE(ZONEID_DEINIT)
#define ZONE_IOCTL          DEBUGZONE(ZONEID_IOCTL)
#define ZONE_READWRITE      DEBUGZONE(ZONEID_READWRITE)

#define ZONE_INFO           DEBUGZONE(ZONEID_INFO)
#define ZONE_FUNCTION       DEBUGZONE(ZONEID_FUNCTION)
#define ZONE_WARN           DEBUGZONE(ZONEID_WARN)
#define ZONE_ERROR          DEBUGZONE(ZONEID_ERROR)
#endif

//------------------------------------------------------------------------------
// Types

//------------------------------------------------------------------------------
// Functions
BOOL OwireInitialize();
void OwireDeinit();
void OwireSoftReset();
BOOL OwireWriteData(BYTE*, DWORD);
BOOL OwireReadData(BYTE*, DWORD);
BOOL OwireSetResetPresencePulse();

#endif   // __OWIRE_PRIV_H__

⌨️ 快捷键说明

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