guanjiao
2018-05-12 4f2a24ebba221274335401a999cb3a027f46db5f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*! ----------------------------------------------------------------------------
 * @file    deca_spi.h
 * @brief    SPI access functions
 *
 * @attention
 *
 * Copyright 2013 (c) DecaWave Ltd, Dublin, Ireland.
 *
 * All rights reserved.
 *
 * @author DecaWave
 */
 
#ifndef _DECA_SPI_H_
#define _DECA_SPI_H_
 
#ifdef __cplusplus
extern "C" {
#endif
 
#include "deca_types.h"
 
#define DECA_MAX_SPI_HEADER_LENGTH      (3)                     // max number of bytes in header (for formating & sizing)
 
/*! ------------------------------------------------------------------------------------------------------------------
 * Function: openspi()
 *
 * Low level abstract function to open and initialise access to the SPI device.
 * returns 0 for success, or -1 for error
 */
int openspi(void) ;
 
/*! ------------------------------------------------------------------------------------------------------------------
 * Function: closespi()
 *
 * Low level abstract function to close the the SPI device.
 * returns 0 for success, or -1 for error
 */
int closespi(void) ;
 
#ifdef __cplusplus
}
#endif
 
#endif /* _DECA_SPI_H_ */