|
mikroSDK Reference Manual
|
Go to the documentation of this file.
44 #ifndef _DRV_SPI_MASTER_H_
45 #define _DRV_SPI_MASTER_H_
52 #include "generic_pointer.h"
424 size_t write_data_length );
461 size_t read_data_length );
514 size_t length_write_data,
515 uint8_t *read_data_buffer,
516 size_t length_read_data );
551 #endif // _DRV_SPI_MASTER_H_
Definition: drv_spi_master.h:73
Pin and port name type definitions.
uint8_t default_write_data
Definition: drv_spi_master.h:127
The SPI Master driver context structure.
Definition: drv_spi_master.h:141
spi_master_mode_t mode
Definition: drv_spi_master.h:132
err_t spi_master_set_speed(spi_master_t *obj, uint32_t speed)
Set SPI Master driver communication speed.
Definition: drv_spi_master.h:76
Definition: drv_spi_master.h:71
err_t spi_master_write(spi_master_t *obj, uint8_t *__generic_ptr write_data_buffer, size_t write_data_length)
Write byte to SPI bus.
pin_name_t miso
Definition: drv_spi_master.h:129
spi_master_err_t
Definition: drv_spi_master.h:59
The SPI Master driver configuration structure.
Definition: drv_spi_master.h:125
Definition: drv_spi_master.h:85
uint32_t speed
Definition: drv_spi_master.h:131
err_t spi_master_close(spi_master_t *obj)
Close SPI Master Driver context object.
void spi_master_select_device(pin_name_t chip_select)
Select SPI Slave device.
Definition: drv_spi_master.h:62
void spi_master_deselect_device(pin_name_t chip_select)
Deselect SPI Slave device.
Definition: drv_spi_master.h:61
spi_master_config_t config
Definition: drv_spi_master.h:144
err_t spi_master_set_mode(spi_master_t *obj, spi_master_mode_t mode)
Set SPI Master driver communication mode.
handle_t handle
Definition: drv_spi_master.h:143
void spi_master_set_chip_select_polarity(spi_master_chip_select_polarity_t polarity)
Set desired SPI Master chip select polarity.
Definition: drv_spi_master.h:74
err_t spi_master_open(spi_master_t *obj, spi_master_config_t *config)
Open the SPI Master driver object on selected pins.
err_t spi_master_read(spi_master_t *obj, uint8_t *read_data_buffer, size_t read_data_length)
Read byte from SPI bus.
void spi_master_configure_default(spi_master_config_t *config)
Configure SPI Master configuration structure.
Definition: drv_spi_master.h:87
hal_pin_name_t pin_name_t
Definition: drv_name.h:73
spi_master_mode_t
Definition: drv_spi_master.h:70
API for Digital output driver.
err_t spi_master_write_then_read(spi_master_t *obj, uint8_t *write_data_buffer, size_t length_write_data, uint8_t *read_data_buffer, size_t length_read_data)
Perform a sequence of SPI Master writes immediately followed by a SPI Master read.
pin_name_t sck
Definition: drv_spi_master.h:128
int32_t err_t
Definition: hal_target.h:63
Definition: drv_spi_master.h:72
pin_name_t mosi
Definition: drv_spi_master.h:130
err_t spi_master_set_default_write_data(spi_master_t *obj, uint8_t default_write_data)
Set SPI Master driver default ( dummy ) write data.
API for SPI Master HAL layer.
spi_master_chip_select_polarity_t
Definition: drv_spi_master.h:82