Fork of Smoothie to port to mbed non-LPC targets.
Fork of Smoothie by
Diff: libs/spi.h
- Revision:
- 3:f151d08d335c
- Parent:
- 2:1df0b61d3b5a
diff -r 1df0b61d3b5a -r f151d08d335c libs/spi.h --- a/libs/spi.h Fri Feb 28 18:52:52 2014 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -#ifndef _SPI_H -#define _SPI_H - -#include <stdint.h> - -#include "spi_hal.h" - -class SPI { -public: - SPI(PinName mosi, PinName miso, PinName sclk); - ~SPI(); - - void frequency(uint32_t); - uint8_t write(uint8_t); - -// int writeblock(uint8_t *, int); - - bool can_DMA(); - int setup_DMA_rx(DMA_REG *); - int setup_DMA_tx(DMA_REG *); - - void irq(void); - - static SPI* isr_dispatch[N_SPI_INTERRUPT_ROUTINES]; - -protected: - uint32_t delay; - Pin_t miso; - Pin_t mosi; - Pin_t sclk; - SPI_REG *sspr; -}; - -#endif /* _SPI_H */