Go to the documentation of this file.
34 #ifndef ADUCM3029_SPI_H
35 # define ADUCM3029_SPI_H
42 #include <drivers/spi/adi_spi.h>
118 #endif // ADUCM3029_SPI_H
no_os_spi_mode
SPI configuration for clock phase and polarity.
Definition: no_os_spi.h:59
enum master_mode master_mode
Definition: aducm3029_spi.h:77
uint32_t device_id
Definition: no_os_spi.h:196
#define NO_OS_SPI_CPOL
Definition: no_os_spi.h:48
uint8_t cs
Definition: aducm3029_spi.h:73
#define NB_SPI_DEVICES
Definition: aducm3029_spi.c:45
Header file of SPI Interface.
bool continuous_mode
Definition: aducm3029_spi.h:91
uint8_t buffer[ADI_SPI_MEMORY_SIZE]
Definition: aducm3029_spi.h:65
SPI specific descriptor for the ADuCM3029. The structure is available in the extra parameter from spi...
Definition: aducm3029_spi.h:111
#define no_os_max(x, y)
Definition: no_os_util.h:64
enum no_os_spi_mode mode
Definition: no_os_spi.h:148
Configuration structure sent in the extra parameter from no_os_spi_init_param.
Definition: aducm3029_spi.h:87
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
int32_t aducm3029_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI. If bytes number is 0 the function will return failure.
Definition: aducm3029_spi.c:222
uint32_t device_id
Definition: no_os_spi.h:142
uint8_t chip_select
Definition: no_os_spi.h:146
uint8_t chip_select
Definition: no_os_spi.h:200
#define MAX_CS_NUMBER
Definition: aducm3029_spi.c:46
ADI_SPI_HANDLE spi_handle
Definition: aducm3029_spi.h:67
struct aducm_device_desc * dev
Definition: aducm3029_spi.h:115
uint32_t bitrate
Definition: aducm3029_spi.h:71
bool dma
Definition: aducm3029_spi.h:98
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
const struct no_os_spi_platform_ops aducm_spi_ops
ADuCM3029 platform specific SPI platform ops structure.
Definition: aducm3029_spi.c:282
void * extra
Definition: no_os_spi.h:212
enum master_mode master_mode
Definition: aducm3029_spi.h:89
uint32_t max_speed_hz
Definition: no_os_spi.h:144
enum no_os_spi_mode mode
Definition: aducm3029_spi.h:75
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
int32_t aducm3029_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: aducm3029_spi.c:121
#define NULL
Definition: wrapper.h:64
bool half_duplex
Definition: aducm3029_spi.h:93
const struct no_os_spi_platform_ops aducm_spi_ops
ADuCM3029 specific SPI platform ops structure.
Definition: aducm3029_spi.c:282
@ SLAVE
Definition: aducm3029_spi.h:54
uint32_t ref_instances
Definition: aducm3029_spi.h:69
int32_t aducm3029_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: aducm3029_spi.c:191
Structure describing the physical SPI devices.
Definition: aducm3029_spi.h:63
master_mode
Available operations mode for a SPI channel.
Definition: aducm3029_spi.h:52
@ MASTER
Definition: aducm3029_spi.h:56
ADuCM302x specific header for SPI driver.
uint32_t max_speed_hz
Definition: no_os_spi.h:198
struct aducm_spi_init_param aducm_conf
Definition: aducm3029_spi.h:113
Header file of utility functions.
#define NO_OS_SPI_CPHA
Definition: no_os_spi.h:47
void * extra
Definition: no_os_spi.h:158
enum no_os_spi_mode mode
Definition: no_os_spi.h:202
bool continuous_mode
Definition: aducm3029_spi.h:79
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140