libyggdrasil  v1.0.0
bsp::asg_coproc::drv::SPI< Context > Struct Template Reference

SPI implementation for Asgard. More...

#include <spi.hpp>

Static Public Member Functions

static bool init ()
 Init function. More...
 
static bool deinit ()
 Deinit function. More...
 
template<size_t N>
static void read (std::array< u8, N > &data)
 SPI receive. More...
 
template<size_t N>
static void write (const std::array< u8, N > &data)
 SPI write. More...
 
static void setMode (bsp::drv::SPIMode mode)
 Set the spi mode (CPOL and CPHA) More...
 

Detailed Description

template<auto Context>
struct bsp::asg_coproc::drv::SPI< Context >

SPI implementation for Asgard.

Warning
Do not use this on its own!
Template Parameters
ContextSPI context

Member Function Documentation

◆ deinit()

template<auto Context>
static bool bsp::asg_coproc::drv::SPI< Context >::deinit ( )
inlinestatic

Deinit function.

Returns
Success

◆ init()

template<auto Context>
static bool bsp::asg_coproc::drv::SPI< Context >::init ( )
inlinestatic

Init function.

Returns
Success

◆ read()

template<auto Context>
template<size_t N>
static void bsp::asg_coproc::drv::SPI< Context >::read ( std::array< u8, N > &  data)
inlinestatic

SPI receive.

Template Parameters
NData size
Parameters
dataArray for the read data

◆ setMode()

template<auto Context>
static void bsp::asg_coproc::drv::SPI< Context >::setMode ( bsp::drv::SPIMode  mode)
inlinestatic

Set the spi mode (CPOL and CPHA)

Parameters
modeSPI mode
Note
This function wait until the SPI is not busy anymore and then the mode change will take place

◆ write()

template<auto Context>
template<size_t N>
static void bsp::asg_coproc::drv::SPI< Context >::write ( const std::array< u8, N > &  data)
inlinestatic

SPI write.

Template Parameters
NData size
Parameters
dataArray to send

The documentation for this struct was generated from the following file: