YAHAL
Yet Another Hardware Abstraction Library
Loading...
Searching...
No Matches
SM Struct Reference

Public Member Functions

 SM (PIO0_t &p, PIO0_t &ps, PIO0_t &pc, uint8_t pi, uint8_t smi, uint8_t l, SM_regs &r)
 
void execute (uint16_t instruction)
 
void setRegister (out_dest_t reg, uint32_t val, uint8_t offset=0, uint8_t size=32)
 
void setClock (uint32_t hz)
 
bool TxFifoFull () const
 
bool TxFifoEmpty () const
 
bool RxFifoEmpty () const
 
void writeTxFifo (uint32_t val)
 
uint32_t readRxFifo ()
 
void setWrap (uint8_t bottom, uint8_t top)
 
void enable ()
 
void disable ()
 
bool isEnabled () const
 
bool isStalled ()
 
void attachIrq (function< void()> handler)
 
void enableIrq ()
 
void disableIrq ()
 
void attachTXNFULLIrq (function< void()> handler)
 
void enableTXNFULLIrq ()
 
void disableTXNFULLIrq ()
 
void attachRXNEMPTYIrq (function< void()> handler)
 
void enableRXNEMPTYIrq ()
 
void disableRXNEMPTYIrq ()
 
 SM (PIO0_t &p, PIO0_t &ps, PIO0_t &pc, uint8_t pi, uint8_t smi, uint8_t l, SM_regs &r)
 
void execute (uint16_t instruction)
 
void setRegister (out_dest_t reg, uint32_t val, uint8_t offset=0, uint8_t size=32)
 
void setClock (uint32_t hz)
 
bool TxFifoFull () const
 
bool TxFifoEmpty () const
 
bool RxFifoFull () const
 
bool RxFifoEmpty () const
 
void writeTxFifo (uint32_t val)
 
uint32_t readRxFifo ()
 
void setWrap (uint8_t bottom, uint8_t top)
 
void enable ()
 
void disable ()
 
bool isEnabled () const
 
void reset ()
 
void restart ()
 
void attachIrq (const function< void()> &handler) const
 
void enableIrq ()
 
void disableIrq ()
 
void attachTXNFULLIrq (const function< void()> &handler) const
 
void enableTXNFULLIrq ()
 
void disableTXNFULLIrq ()
 
void attachRXNEMPTYIrq (const function< void()> &handler) const
 
void enableRXNEMPTYIrq ()
 
void disableRXNEMPTYIrq ()
 

Public Attributes

PIO0_tpio
 
PIO0_tpio_set
 
PIO0_tpio_clr
 
uint8_t pio_index
 
uint8_t sm_index
 
uint8_t load_addr
 
SM_regsregs
 

Detailed Description

Definition at line 227 of file pio_rp2040.h.

Constructor & Destructor Documentation

◆ SM() [1/2]

SM::SM ( PIO0_t & p,
PIO0_t & ps,
PIO0_t & pc,
uint8_t pi,
uint8_t smi,
uint8_t l,
SM_regs & r )
inline

Definition at line 236 of file pio_rp2040.h.

◆ SM() [2/2]

SM::SM ( PIO0_t & p,
PIO0_t & ps,
PIO0_t & pc,
uint8_t pi,
uint8_t smi,
uint8_t l,
SM_regs & r )
inline

Definition at line 244 of file pio_rp2350.h.

Member Function Documentation

◆ attachIrq() [1/2]

void SM::attachIrq ( const function< void()> & handler) const

Definition at line 80 of file pio_rp2350.cpp.

◆ attachIrq() [2/2]

void SM::attachIrq ( function< void()> handler)

Definition at line 67 of file pio_rp2040.cpp.

◆ attachRXNEMPTYIrq() [1/2]

void SM::attachRXNEMPTYIrq ( const function< void()> & handler) const

Definition at line 117 of file pio_rp2350.cpp.

◆ attachRXNEMPTYIrq() [2/2]

void SM::attachRXNEMPTYIrq ( function< void()> handler)

Definition at line 97 of file pio_rp2040.cpp.

◆ attachTXNFULLIrq() [1/2]

void SM::attachTXNFULLIrq ( const function< void()> & handler) const

Definition at line 102 of file pio_rp2350.cpp.

◆ attachTXNFULLIrq() [2/2]

void SM::attachTXNFULLIrq ( function< void()> handler)

Definition at line 82 of file pio_rp2040.cpp.

◆ disable() [1/2]

void SM::disable ( )
inline

Definition at line 298 of file pio_rp2040.h.

◆ disable() [2/2]

void SM::disable ( )
inline

Definition at line 311 of file pio_rp2350.h.

◆ disableIrq()

void SM::disableIrq ( )

Definition at line 78 of file pio_rp2040.cpp.

◆ disableRXNEMPTYIrq()

void SM::disableRXNEMPTYIrq ( )

Definition at line 108 of file pio_rp2040.cpp.

◆ disableTXNFULLIrq()

void SM::disableTXNFULLIrq ( )

Definition at line 93 of file pio_rp2040.cpp.

◆ enable() [1/2]

void SM::enable ( )
inline

Definition at line 293 of file pio_rp2040.h.

◆ enable() [2/2]

void SM::enable ( )
inline

Definition at line 306 of file pio_rp2350.h.

◆ enableIrq()

void SM::enableIrq ( )

Definition at line 74 of file pio_rp2040.cpp.

◆ enableRXNEMPTYIrq()

void SM::enableRXNEMPTYIrq ( )

Definition at line 104 of file pio_rp2040.cpp.

◆ enableTXNFULLIrq()

void SM::enableTXNFULLIrq ( )

Definition at line 89 of file pio_rp2040.cpp.

◆ execute() [1/2]

void SM::execute ( uint16_t instruction)
inline

Definition at line 244 of file pio_rp2040.h.

◆ execute() [2/2]

void SM::execute ( uint16_t instruction)
inline

Definition at line 252 of file pio_rp2350.h.

◆ isEnabled() [1/2]

bool SM::isEnabled ( ) const
inline

Definition at line 303 of file pio_rp2040.h.

◆ isEnabled() [2/2]

bool SM::isEnabled ( ) const
inline

Definition at line 316 of file pio_rp2350.h.

◆ isStalled()

bool SM::isStalled ( )
inline

Definition at line 307 of file pio_rp2040.h.

◆ readRxFifo() [1/2]

uint32_t SM::readRxFifo ( )
inline

Definition at line 280 of file pio_rp2040.h.

◆ readRxFifo() [2/2]

uint32_t SM::readRxFifo ( )
inline

Definition at line 293 of file pio_rp2350.h.

◆ reset()

void SM::reset ( )
inline

Definition at line 321 of file pio_rp2350.h.

◆ restart()

void SM::restart ( )
inline

Definition at line 329 of file pio_rp2350.h.

◆ RxFifoEmpty() [1/2]

bool SM::RxFifoEmpty ( ) const
inline

Definition at line 269 of file pio_rp2040.h.

◆ RxFifoEmpty() [2/2]

bool SM::RxFifoEmpty ( ) const
inline

Definition at line 282 of file pio_rp2350.h.

◆ RxFifoFull()

bool SM::RxFifoFull ( ) const
inline

Definition at line 277 of file pio_rp2350.h.

◆ setClock()

void SM::setClock ( uint32_t hz)

Definition at line 60 of file pio_rp2040.cpp.

◆ setRegister()

void SM::setRegister ( out_dest_t reg,
uint32_t val,
uint8_t offset = 0,
uint8_t size = 32 )

Definition at line 35 of file pio_rp2040.cpp.

◆ setWrap() [1/2]

void SM::setWrap ( uint8_t bottom,
uint8_t top )
inline

Definition at line 287 of file pio_rp2040.h.

◆ setWrap() [2/2]

void SM::setWrap ( uint8_t bottom,
uint8_t top )
inline

Definition at line 300 of file pio_rp2350.h.

◆ TxFifoEmpty() [1/2]

bool SM::TxFifoEmpty ( ) const
inline

Definition at line 264 of file pio_rp2040.h.

◆ TxFifoEmpty() [2/2]

bool SM::TxFifoEmpty ( ) const
inline

Definition at line 272 of file pio_rp2350.h.

◆ TxFifoFull() [1/2]

bool SM::TxFifoFull ( ) const
inline

Definition at line 259 of file pio_rp2040.h.

◆ TxFifoFull() [2/2]

bool SM::TxFifoFull ( ) const
inline

Definition at line 267 of file pio_rp2350.h.

◆ writeTxFifo() [1/2]

void SM::writeTxFifo ( uint32_t val)
inline

Definition at line 274 of file pio_rp2040.h.

◆ writeTxFifo() [2/2]

void SM::writeTxFifo ( uint32_t val)
inline

Definition at line 287 of file pio_rp2350.h.

Member Data Documentation

◆ load_addr

uint8_t SM::load_addr

Definition at line 233 of file pio_rp2040.h.

◆ pio

PIO0_t & SM::pio

Definition at line 228 of file pio_rp2040.h.

◆ pio_clr

PIO0_t & SM::pio_clr

Definition at line 230 of file pio_rp2040.h.

◆ pio_index

uint8_t SM::pio_index

Definition at line 231 of file pio_rp2040.h.

◆ pio_set

PIO0_t & SM::pio_set

Definition at line 229 of file pio_rp2040.h.

◆ regs

SM_regs & SM::regs

Definition at line 234 of file pio_rp2040.h.

◆ sm_index

uint8_t SM::sm_index

Definition at line 232 of file pio_rp2040.h.


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