Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: DirectSPI-test wave_player_super_lite
DirectSPI.h
00001 #ifndef __DIRECTSPI_H_ 00002 #define __DIRECTSPI_H_ 00003 00004 #include "mbed.h" 00005 #include "PeripheralPins.h" 00006 #define TODO 0 00007 00008 class DirectSPI : public SPI 00009 { 00010 public: 00011 DirectSPI(PinName mosi, PinName miso, PinName sclk); 00012 uint16_t directWrite8(uint16_t data); 00013 uint16_t directWrite16(uint16_t data); 00014 uint16_t directWrite(uint16_t data); 00015 SPI_TypeDef *spi_get_id( PinName mosi, PinName miso, PinName sclk, PinName ssel); 00016 void operator = (uint8_t d8){ 00017 volatile uint16_t res; 00018 res = directWrite8( d8 ); 00019 } 00020 protected: 00021 SPI_TypeDef *spi; 00022 #if TODO 00023 uint16_t (DirectSPI::*spiSend)(uint16_t data); 00024 uint16_t spiSend8(uint16_t data){return 0;}; 00025 uint16_t spiSend16(uint16_t data){return 0;}; 00026 #endif 00027 }; 00028 00029 #endif /* __DIRECTSPI_H_ */ 00030
Generated on Tue Aug 9 2022 13:37:20 by
1.7.2