Go to the documentation of this file.
41 #include "hardware/spi.h"
135 #endif // _PICO_SPI_H_
const struct no_os_spi_platform_ops pico_spi_ops
pico platform specific SPI platform ops structure
Definition: pico_spi.c:302
enum spi_sck_gp spi_sck_pin
Definition: pico_spi.h:111
@ NO_OS_SPI_MODE_1
Definition: no_os_spi.h:63
spi_inst_t * spi_instance
Definition: pico_spi.h:105
@ SPI0_SCK_GP18
Definition: pico_spi.h:80
@ SPI0_TX_GP3
Definition: pico_spi.h:52
@ SPI1_RX_GP12
Definition: pico_spi.h:70
uint32_t device_id
Definition: no_os_spi.h:196
Header file for the pico spi driver.
#define PICO_SPI_MAX_INSTANCES
Definition: pico_spi.c:50
Header file of SPI Interface.
pico platform specific SPI descriptor
Definition: pico_spi.h:103
int32_t pico_spi_transfer(struct no_os_spi_desc *desc, struct no_os_spi_msg *msgs, uint32_t len)
Write/read multiple messages to/from SPI.
Definition: pico_spi.c:215
Definition: no_os_spi.h:100
Header file of Delay functions.
enum spi_rx_gp spi_rx_pin
Definition: pico_spi.h:123
spi_rx_gp
Available GP config for SPI RX.
Definition: pico_spi.h:63
enum no_os_spi_mode mode
Definition: no_os_spi.h:148
@ NO_OS_SPI_MODE_2
Definition: no_os_spi.h:65
spi_sck_gp
Available GP config for SPI SCK.
Definition: pico_spi.h:76
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
@ SPI0_CS_GP17
Definition: pico_spi.h:93
@ NO_OS_SPI_MODE_3
Definition: no_os_spi.h:67
enum spi_cs_gp spi_cs_pin
Definition: pico_spi.h:127
uint8_t * tx_buff
Definition: no_os_spi.h:102
uint32_t device_id
Definition: no_os_spi.h:142
uint8_t chip_select
Definition: no_os_spi.h:200
@ SPI1_CS_GP13
Definition: pico_spi.h:96
const struct no_os_spi_platform_ops pico_spi_ops
pico specific SPI platform ops structure
Definition: pico_spi.c:302
int32_t pico_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: pico_spi.c:135
uint8_t * rx_buff
Definition: no_os_spi.h:104
spi_tx_gp
Available GP config for SPI TX.
Definition: pico_spi.h:50
enum no_os_spi_bit_order bit_order
Definition: no_os_spi.h:204
Additional SPI config parameters.
Definition: pico_spi.h:119
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
@ SPI0_RX_GP0
Definition: pico_spi.h:65
@ SPI0_SCK_GP6
Definition: pico_spi.h:79
uint32_t bytes_number
Definition: no_os_spi.h:106
void * extra
Definition: no_os_spi.h:212
int32_t pico_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: pico_spi.c:192
uint32_t max_speed_hz
Definition: no_os_spi.h:144
@ SPI0_CS_GP5
Definition: pico_spi.h:92
enum spi_sck_gp spi_sck_pin
Definition: pico_spi.h:125
@ SPI0_RX_GP16
Definition: pico_spi.h:67
@ SPI1_TX_GP11
Definition: pico_spi.h:56
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
@ NO_OS_SPI_BIT_ORDER_MSB_FIRST
Definition: no_os_spi.h:76
spi_cs_gp
Available GP config for SPI CS.
Definition: pico_spi.h:89
@ SPI1_SCK_GP14
Definition: pico_spi.h:83
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
enum spi_tx_gp spi_tx_pin
Definition: pico_spi.h:107
@ SPI0_TX_GP7
Definition: pico_spi.h:53
@ SPI1_TX_GP15
Definition: pico_spi.h:57
int32_t pico_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: pico_spi.c:279
@ SPI0_RX_GP4
Definition: pico_spi.h:66
@ SPI0_CS_GP1
Definition: pico_spi.h:91
@ SPI1_RX_GP8
Definition: pico_spi.h:69
@ SPI0_SCK_GP2
Definition: pico_spi.h:78
uint32_t max_speed_hz
Definition: no_os_spi.h:198
@ SPI0_TX_GP19
Definition: pico_spi.h:54
enum spi_rx_gp spi_rx_pin
Definition: pico_spi.h:109
Header file of utility functions.
enum spi_cs_gp spi_cs_pin
Definition: pico_spi.h:113
void * extra
Definition: no_os_spi.h:158
@ NO_OS_SPI_MODE_0
Definition: no_os_spi.h:61
enum no_os_spi_mode mode
Definition: no_os_spi.h:202
@ SPI1_SCK_GP10
Definition: pico_spi.h:82
enum spi_tx_gp spi_tx_pin
Definition: pico_spi.h:121
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
@ SPI1_CS_GP9
Definition: pico_spi.h:95