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.
PlatformSPI.cpp
00001 // interface for SPI implemented with mbed framework 00002 00003 #include "PlatformSPI.h" 00004 #include "mbed.h" 00005 00006 SPI spi_adc(PA_7, PA_6, PA_5); // PinName mosi, PinName miso, PinName sclk, PinName ssel=NC 00007 00008 void DSPI0::begin() 00009 { 00010 00011 } 00012 00013 void DSPI0::setSpeed(int speed_hz) 00014 { 00015 spi_adc.frequency(speed_hz); 00016 } 00017 00018 void DSPI0::setMode(int mode) 00019 { 00020 spi_adc.format(8,mode); 00021 } 00022 00023 int DSPI0::transfer(int data) 00024 { 00025 return spi_adc.write(data); 00026 } 00027
Generated on Wed Jul 20 2022 12:01:51 by
1.7.2