MAV'RIC
Classes | Public Member Functions
Spi_chibios Class Reference

SPI peripherals driver using CHibios/HAL. More...

#include <spi_chibios.hpp>

Inheritance diagram for Spi_chibios:
Inheritance graph
[legend]
Collaboration diagram for Spi_chibios:
Collaboration graph
[legend]

List of all members.

Classes

struct  conf_t
 Configuration structure. More...

Public Member Functions

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

Detailed Description

SPI peripherals driver using CHibios/HAL.


Constructor & Destructor Documentation

Constructor.

Parameters:
configDevice configuration

Member Function Documentation

bool Spi_chibios::init ( void  ) [virtual]

Hardware initialization.

Returns:
true Success
false Error

Implements Spi.

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

Read data from the SPI bus.

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

Implements Spi.

bool Spi_chibios::transfer ( uint8_t *  out_buffer,
uint8_t *  in_buffer,
uint32_t  nbytes 
) [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

Implements Spi.

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

Write data to the SPI bus.

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

Implements Spi.


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