MAV'RIC
Public Member Functions
Spi Class Reference
Inheritance diagram for Spi:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool init (void)=0
 Hardware initialization.
virtual bool write (uint8_t *out_buffer, uint32_t nbytes)=0
 Write data to the SPI bus.
virtual bool read (uint8_t *in_buffer, uint32_t nbytes)=0
 Read data from the SPI bus.
virtual bool transfer (uint8_t *out_buffer, uint8_t *in_buffer, uint32_t nbytes)=0
 Write and Read data to/from the SPI bus.

Member Function Documentation

virtual bool Spi::init ( void  ) [pure virtual]

Hardware initialization.

Returns:
true Success
false Error

Implemented in Spi_avr32, Spi_stm32, and Spi_chibios.

virtual bool Spi::read ( uint8_t *  in_buffer,
uint32_t  nbytes 
) [pure virtual]

Read data from the SPI bus.

Parameters:
in_bufferData buffer
nbytesNumber of bytes to read
Returns:
true Success
false Failed

Implemented in Spi_stm32, and Spi_chibios.

virtual bool Spi::transfer ( uint8_t *  out_buffer,
uint8_t *  in_buffer,
uint32_t  nbytes 
) [pure virtual]

Write and Read data to/from the SPI bus.

Parameters:
out_bufferData buffer (output)
in_bufferData buffer (input)
nbytesNumber of bytes to write/read
Returns:
true Success
false Failed

Implemented in Spi_avr32, Spi_stm32, and Spi_chibios.

Here is the caller graph for this function:

virtual bool Spi::write ( uint8_t *  out_buffer,
uint32_t  nbytes 
) [pure virtual]

Write data to the SPI bus.

Parameters:
out_bufferData buffer
nbytesNumber of bytes to write
Returns:
true Success
false Failed

Implemented in Spi_stm32, and Spi_chibios.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines