no-OS
Toggle main menu visibility
Main Page
Related Pages
Structures
Structure List
Structure Index
Files
File List
•
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
drivers
platform
mbed
mbed_spi.h
Go to the documentation of this file.
1
/***************************************************************************/
31
32
#ifndef MBED_SPI_H_
33
#define MBED_SPI_H_
34
35
// Platform support needs to be C-compatible to work with other drivers
36
#ifdef __cplusplus
37
extern
"C"
38
{
39
#endif
40
41
#include <stdio.h>
42
#include <stdbool.h>
43
44
/*
45
* Note: The structure members are not strongly typed, as this file is included
46
* in application specific '.c' files. The mbed code structure does not
47
* allow inclusion of mbed driver files (e.g. mbed.h) into '.c' files.
48
* All the members are hence typecasted to mbed specific type during
49
* spi init and read/write operations.
50
**/
51
56
struct
mbed_spi_init_param
{
57
uint16_t
spi_miso_pin
;
// SPI MISO pin (PinName)
58
uint16_t
spi_mosi_pin
;
// SPI MOSI pin (PinName)
59
uint16_t
spi_clk_pin
;
// SPI CLK pin (PinName)
60
bool
use_sw_csb
;
// Software/Hardware control of CSB pin
61
};
56
struct
mbed_spi_init_param
{
…
};
62
67
struct
mbed_spi_desc
{
68
void
*
spi_port
;
// SPI port instance (mbed::SPI)
69
void
*
csb_gpio
;
// SPI chip select gpio instance (DigitalOut)
70
bool
use_sw_csb
;
// Software/Hardware control of CSB pin
71
};
67
struct
mbed_spi_desc
{
…
};
72
76
extern
const
struct
no_os_spi_platform_ops
mbed_spi_ops
;
77
78
#ifdef __cplusplus
// Closing extern c
79
}
80
#endif
81
82
#endif
/* MBED_SPI_H_ */
mbed_spi_ops
const struct no_os_spi_platform_ops mbed_spi_ops
Mbed platform specific SPI platform ops structure.
mbed_spi_desc
SPI specific descriptor for the mbed platform.
Definition
mbed_spi.h:67
mbed_spi_desc::csb_gpio
void * csb_gpio
Definition
mbed_spi.h:69
mbed_spi_desc::spi_port
void * spi_port
Definition
mbed_spi.h:68
mbed_spi_desc::use_sw_csb
bool use_sw_csb
Definition
mbed_spi.h:70
mbed_spi_init_param
Structure holding the SPI init parameters for mbed platform.
Definition
mbed_spi.h:56
mbed_spi_init_param::spi_mosi_pin
uint16_t spi_mosi_pin
Definition
mbed_spi.h:58
mbed_spi_init_param::use_sw_csb
bool use_sw_csb
Definition
mbed_spi.h:60
mbed_spi_init_param::spi_miso_pin
uint16_t spi_miso_pin
Definition
mbed_spi.h:57
mbed_spi_init_param::spi_clk_pin
uint16_t spi_clk_pin
Definition
mbed_spi.h:59
no_os_spi_platform_ops
Structure holding SPI function pointers that point to the platform specific function.
Definition
no_os_spi.h:210
Generated by
1.13.2