eRPC API Reference
Rev. 1.12.0
NXP Semiconductors
Main Page
API Reference
Classes
Files
File List
File Members
erpc_spidev.h
1
/*
2
* Copyright 2020 NXP
3
* All rights reserved.
4
*
5
*
6
* SPDX-License-Identifier: BSD-3-Clause
7
*/
8
9
#ifndef _ERPC_SPIDEV_H_
10
#define _ERPC_SPIDEV_H_
11
12
#if __cplusplus
13
extern
"C"
{
14
#endif
15
16
#define ERPC_SPIDEV_STATUS_SUCCESS 0
17
#define ERPC_SPIDEV_STATUS_FAIL -1
18
19
int
spidev_open(
const
char
*port);
20
int
spidev_set_mode(
int
fd,
unsigned
char
mode);
21
int
spidev_set_speed(
int
fd,
unsigned
int
speed_hz);
22
int
spidev_set_wordbits(
int
fd,
unsigned
char
bits);
23
int
spidev_transfer(
int
fd,
const
unsigned
char
*tx_buf,
unsigned
char
*rx_buf,
unsigned
int
len);
24
int
spidev_close(
int
fd);
25
26
#if __cplusplus
27
}
28
#endif
29
30
#endif
/* _ERPC_SPIDEV_H_ */
Copyright 2016-2020 NXP Semiconductors. All rights reserved.