]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blob - rpp/include/drv/spi.h
26b6830a235b56de6006283d153bd7b9d5906d8d
[pes-rpp/rpp-lib.git] / rpp / include / drv / spi.h
1 /**
2  *
3  * @file spi.h
4  *
5  * @copyright Copyright (C) 2012-2013 Czech Technical University in Prague
6  *
7  */
8
9 #ifndef _SPI_DRV_H_
10 #define _SPI_DRV_H_
11
12 #include "drv/spi_tms570.h"
13
14 UL_LIST_CUST_DEC(spi_rq_queue, spi_drv_t, spi_msg_head_t, rq_queue, node)
15
16 /* ------------------------------------------------------------------------- */
17
18 //typedef unsigned long spi_isr_lock_level_t;
19 //#define spi_isr_lock    save_and_cli
20 //#define  spi_isr_unlock restore_flags
21
22 /* ------------------------------------------------------------------------- */
23 int spi_transfer(spi_drv_t *ifc, int addr, int rq_len, const void *tx_buf, void *rx_buf);
24 //spi_drv_t *spi_find_drv(char *name, int number);
25 int spi_msg_rq_ins(spi_drv_t *ifc, spi_msg_head_t *msg);
26
27 #endif /* _SPI_DRV_H_ */