欢迎来到虫虫下载站 | 资源下载 资源专辑 关于我们
虫虫下载站

hal_spi.h

最新版IAR FOR ARM(EWARM)5.11中的代码例子
H
字号:

/**************************************************************************/
/*                                                                        */
/*     Copyright (C) 2006 Oki Electric Industry Co., LTD.                 */
/*                                                                        */
/*     System Name  :  ML675050 series                                    */
/*     Module Name  :  ML675050 spi HAL program                           */
/*     File   Name  :  hal_spi.h                                          */
/*     Revision     :  01.00                                              */
/*     Date         :  2006/1/11 initial version                          */
/*                                                                        */
/**************************************************************************/

#ifndef HAL_SPI_H
#define HAL_SPI_H


#define SPI_DEVICE_MASTER   0x00000002   /* master */
#define SPI_DEVICE_SLAVE    0x00000000   /* slave */
#define SPI_BAUDRATE        0x000003ff
#define SPI_SEND_SIZE       0x00000000
#define SPI_LSB_FIRST       0x00000000
#define SPI_FIFO_MAX        16

struct ML675050_SpiParam {
    uint32_t device_select; /* device select */
    uint32_t baudrate;      /* baudrate */
    uint32_t send_size;     /* send size */
    uint32_t send_order;    /* send order */
};

/******************************/
/*     Functions define       */
/******************************/
int16_t HalSpi_SpiInit(struct ML675050_SpiParam *pInit);
int16_t HalSpi_SpiMasterTxData(void);
int16_t HalSpi_SpiSlaveTxData(void); 
int16_t HalSpi_SpiReadStatus(uint32_t *status);


#endif  /* end of HAL_SPI_H */

⌨️ 快捷键说明

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