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: Freedman_v2 Nucleo_i2c_OLED_BME280_copy
Fork of mbed-src by
Diff: common/SPI.cpp
- Revision:
- 212:34d62c0b2af6
- Parent:
- 50:b08ceb75017d
- Child:
- 525:c320967f86b9
--- a/common/SPI.cpp Sun May 25 08:00:07 2014 +0100 +++ b/common/SPI.cpp Mon May 26 18:15:07 2014 +0100 @@ -19,11 +19,12 @@ namespace mbed { -SPI::SPI(PinName mosi, PinName miso, PinName sclk, PinName _unused) { +SPI::SPI(PinName mosi, PinName miso, PinName sclk, PinName _unused) : + _spi(), + _bits(8), + _mode(0), + _hz(1000000) { spi_init(&_spi, mosi, miso, sclk, NC); - _bits = 8; - _mode = 0; - _hz = 1000000; spi_format(&_spi, _bits, _mode, 0); spi_frequency(&_spi, _hz); }