|
mikroSDK Reference Manual
|
Go to the documentation of this file.
44 #ifndef _HAL_SPI_MASTER_H_
45 #define _HAL_SPI_MASTER_H_
52 #include "generic_pointer.h"
53 #include "hal_ll_spi_master.h"
407 size_t write_data_length );
437 size_t read_data_length );
485 size_t length_write_data,
486 uint8_t *read_data_buffer,
487 size_t length_read_data );
515 #endif // _HAL_SPI_MASTER_H_
Definition: hal_spi_master.h:90
hal_spi_master_config_t config
Definition: hal_spi_master.h:149
err_t hal_spi_master_close(handle_t *handle)
Close SPI Master HAL context object.
err_t hal_spi_master_open(handle_t *handle, bool hal_obj_open_state)
Open the SPI Master HAL object on selected pins.
HAL SPI Master init configuration structure, consisted of the following fields :
Definition: hal_spi_master.h:123
SPI master HAL context structure, consisted of the following fields :
Definition: hal_spi_master.h:146
uint32_t speed
Definition: hal_spi_master.h:129
Definition: hal_spi_master.h:89
err_t hal_spi_master_set_speed(handle_t *handle, hal_spi_master_config_t *config)
Set desired SPI communication speed.
void hal_spi_master_select_device(hal_pin_name_t chip_select)
Select SPI Slave device.
hal_pin_name_t miso
Definition: hal_spi_master.h:127
hal_spi_master_mode_t
Definition: hal_spi_master.h:74
Definition: hal_spi_master.h:159
Definition: hal_spi_master.h:81
err_t hal_spi_master_write(handle_t handle, uint8_t *__generic_ptr write_data_buffer, size_t write_data_length)
Write byte to SPI bus.
hal_spi_master_err_t
Definition: hal_spi_master.h:155
hal_spi_master_mode_t mode
Definition: hal_spi_master.h:130
HAL target macros and typedefs.
Definition: hal_spi_master.h:79
err_t hal_spi_master_set_mode(handle_t *handle, hal_spi_master_config_t *config)
Set desired SPI communication mode.
hal_ll_pin_name_t hal_pin_name_t
Definition: hal_target.h:59
This file contains all the functions prototypes for the GPIO library.
handle_t * hal_spi_master_handle
Definition: hal_spi_master.h:66
Definition: hal_spi_master.h:76
void hal_spi_master_deselect_device(hal_pin_name_t chip_select)
Deselect SPI Slave device.
Definition: hal_spi_master.h:91
Definition: hal_spi_master.h:78
handle_t handle
Definition: hal_spi_master.h:148
void hal_spi_master_configure_default(hal_spi_master_config_t *config)
Configure SPI Master configuration structure with default values.
handle_t * drv_spi_master_handle
Definition: hal_spi_master.h:67
Definition: hal_spi_master.h:158
Definition: hal_spi_master.h:157
hal_spi_master_chip_select_polarity_t
Definition: hal_spi_master.h:87
void hal_spi_master_set_default_write_data(handle_t *handle, hal_spi_master_config_t *config)
Set SPI Master default ( dummy ) write data.
void hal_spi_master_set_chip_select_polarity(hal_spi_master_chip_select_polarity_t polarity)
Set desired chip select polarity.
err_t hal_spi_master_read(handle_t handle, uint8_t *read_data_buffer, size_t read_data_length)
Read byte from SPI bus.
bool init_state
Definition: hal_spi_master.h:68
hal_pin_name_t sck
Definition: hal_spi_master.h:126
uint8_t default_write_data
Definition: hal_spi_master.h:125
Definition: hal_spi_master.h:77
err_t hal_spi_master_write_then_read(handle_t handle, 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.
int32_t err_t
Definition: hal_target.h:63
hal_pin_name_t mosi
Definition: hal_spi_master.h:128
Definition: hal_spi_master.h:156
SPI Master level handle.
Definition: hal_spi_master.h:64