Class ArchXT_SPI::_Controller

Nested Relationships

This class is a nested type of Class ArchXT_SPI.

Inheritance Relationships

Base Types

Class Documentation

class _Controller : public SPI::EndPoint, public CycleTimer

Public Functions

explicit _Controller(ArchXT_SPI &peripheral)
inline PinDriver &pin_driver()
void init(CycleManager &cycle_manager, Logger &logger)
void reset()
void set_bit_delay(cycle_count_t delay)
void set_mode(ControllerMode mode)
inline ControllerMode mode() const
void set_serial_mode(SerialMode mode)
void push_tx(uint8_t data, bool force_buffer)
inline bool tx_pending() const
uint8_t pop_rx()
uint8_t peek_rx() const
inline unsigned int rx_available() const
uint8_t mock_transfer(uint8_t rx_frame)
inline void input_clock(bool state)
void set_selected(bool selected)
inline bool selected() const
virtual cycle_count_t next(cycle_count_t when) override

Callback from the cycle loop.

Note

there’s no guarantee the method will be called exactly on the required ‘when’ cycle. The only guarantee is “called ‘when’ <= ‘current cycle’”, the implementations must account for this.

Note

The next ‘when’ can be in the ‘past’ (i.e. <= ‘current cycle’). In this case, the timer will be called again within the same cycle with the given next ‘when’. The only constraint is that it must be greater than the previous ‘when’. If it’s negative or zero, the timer is removed from the queue.

Parameters:

when – current ‘when’ cycle, at which the timer was scheduled

Returns:

the next ‘when’ the timer requires to be called at.

Protected Functions

virtual void frame_completed() override
virtual void write_data_output(bool level) override
virtual bool read_data_input() override