32 m_cs(cs, (pulse == 0)),
56 m_sck.write(dev->
m_mode & 0x02);
73 if (dev->m_irq !=
NULL) dev->m_irq->enable();
92 m_mosi._write(value & 0x80);
95 if (m_miso.is_set()) value |= 0x01;
101 m_mosi._write(value & 0x01);
104 if (m_miso.is_set()) value |= 0x80;
void acquire(Driver *dev)
Driver(Board::DigitalPin cs, Pulse pulse=DEFAULT_PULSE, Clock clock=DEFAULT_CLOCK, uint8_t mode=0, Order order=MSB_ORDER, Interrupt::Handler *irq=NULL)
Driver * m_next
List of drivers.
uint8_t transfer(uint8_t data)
uint8_t m_mode
Mode for phase and transition.
Driver * m_next
List of drivers.
Most significant bit first.
Interrupt::Handler * m_irq
Interrupt handler.