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

📄 lib_twi.h

📁 ARM9200开发板的ROM boot程序源码1.0
💻 H
字号:
//*---------------------------------------------------------------------------
//*      ATMEL Microcontroller Software Support  -  ROUSSET  -
//*---------------------------------------------------------------------------
//* The software is delivered "AS IS" without warranty or condition of any
//* kind, either express, implied or statutory. This includes without
//* limitation any warranty or condition with respect to merchantability or
//* fitness for any particular purpose, or against the infringements of
//* intellectual property rights of others.
//*-----------------------------------------------------------------------------
//* File Name           : lib_twi.h
//* Object              : Two Wire Interface Library Header.
//*
//* 1.0 05/03/01 HI    : Creation
//*---------------------------------------------------------------------------
#ifndef lib_twi_h
#define lib_twi_h
#include    "periph/stdc/std_c.h"
#include    "periph/twi/twi.h"
#include    "periph/pio/lib_pio.h"


typedef struct _AT91S_TWIDesc
{
    AT91PS_TWI 				TWI_base ;
    const AT91PS_PIO        pio_base ;
    u_int					pin_sck ;
    u_int					pin_sda ;
    u_int 					periph_id;
}AT91S_TWIDesc, *AT91PS_TWIDesc;


extern void at91_TWI_open(const AT91PS_APMC, const AT91PS_TWIDesc , u_int  );
extern void at91_TWI_close( const AT91PS_APMC, const AT91PS_TWIDesc ) ;
extern void at91_TWI_set_mode( const AT91PS_TWIDesc , u_int ) ;
extern void at91_TWI_read( const AT91PS_TWIDesc , short *) ;
extern void at91_TWI_write( const AT91PS_TWIDesc , short *) ;
extern u_int at91_TWI_get_status( const AT91PS_TWIDesc ) ;
extern u_int at91_TWI_send_frame( const AT91PS_TWIDesc , char *, u_int  ) ;
extern u_int at91_TWI_receive_frame( const AT91PS_TWIDesc , char *, u_int );

#endif //* lib_twi_h

⌨️ 快捷键说明

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