this is a C++ wrapper for the original pico SDK spi master API
More...
#include <hw_spi.h>
|
| HW_SPI_Master (struct_ConfigMasterSPI master_config) |
| Construct a new hw spi master object.
|
|
int | burst_write_8 (uint8_t *src, size_t len) |
| send a serie of 8 bit data on the SPI MOSI port
|
|
int | burst_write_16 (uint16_t *src, size_t len) |
| send a serie of 16 bit data on the SPI MOSI port
|
|
int | burst_write_read_8 (uint8_t *src, uint8_t *dest, size_t len) |
| read / write a serie of 8 bit data on the SPI MISO/MOSI ports
|
|
int | single_write_8 (uint8_t byte_value) |
| write a single byte on the SPI MOSI port
|
|
int | single_write_16 (uint16_t word_value) |
| write a single 16bit word on the SPI MOSI port
|
|
int | single_read_8 (uint8_t *dest) |
| read a single byte on the SPI MISO port
|
|
int | burst_read_8 (uint8_t repeated_tx_data, uint8_t *dest, size_t len) |
| read a serie of byte on the SPI MISO port
|
|
bool | device_is_connected (uint8_t slave_address) |
| a test that checks if the slave_address device is connected
|
|
this is a C++ wrapper for the original pico SDK spi master API
◆ HW_SPI_Master()
Construct a new hw spi master object.
- Parameters
-
◆ burst_read_8()
int HW_SPI_Master::burst_read_8 |
( |
uint8_t | repeated_tx_data, |
|
|
uint8_t * | dest, |
|
|
size_t | len ) |
read a serie of byte on the SPI MISO port
- Parameters
-
repeated_tx_data | the byte sent on MOSI port during the read transfer |
dest | the destination that receives the data |
len | the length of the serie |
- Returns
- int
◆ burst_write_16()
int HW_SPI_Master::burst_write_16 |
( |
uint16_t * | src, |
|
|
size_t | len ) |
send a serie of 16 bit data on the SPI MOSI port
- Parameters
-
src | the source of the data |
len | the lenght of the serie |
- Returns
- int the number of byte sent
◆ burst_write_8()
int HW_SPI_Master::burst_write_8 |
( |
uint8_t * | src, |
|
|
size_t | len ) |
send a serie of 8 bit data on the SPI MOSI port
- Parameters
-
src | the source of the data |
len | the lenght of the serie |
- Returns
- int the number of byte sent
◆ burst_write_read_8()
int HW_SPI_Master::burst_write_read_8 |
( |
uint8_t * | src, |
|
|
uint8_t * | dest, |
|
|
size_t | len ) |
read / write a serie of 8 bit data on the SPI MISO/MOSI ports
- Parameters
-
src | the source of the data |
dest | the destination of the data |
len | the length of the serie |
- Returns
- int
◆ device_is_connected()
bool HW_SPI_Master::device_is_connected |
( |
uint8_t | slave_address | ) |
|
a test that checks if the slave_address device is connected
- Parameters
-
- Returns
- true
-
false
◆ single_read_8()
int HW_SPI_Master::single_read_8 |
( |
uint8_t * | dest | ) |
|
read a single byte on the SPI MISO port
- Parameters
-
dest | the destination that receives the data |
- Returns
- int
◆ single_write_16()
int HW_SPI_Master::single_write_16 |
( |
uint16_t | word_value | ) |
|
write a single 16bit word on the SPI MOSI port
- Parameters
-
- Returns
- int
◆ single_write_8()
int HW_SPI_Master::single_write_8 |
( |
uint8_t | byte_value | ) |
|
write a single byte on the SPI MOSI port
- Parameters
-
- Returns
- int
The documentation for this class was generated from the following files: