lib_twi.h

来自「ARM9200开发板的ROM boot程序源码1.0」· C头文件 代码 · 共 42 行

H
42
字号
//*---------------------------------------------------------------------------
//*      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 + =
减小字号Ctrl + -
显示快捷键?