Generic mbed Extensions used by STM Expansion Board Firmware Packages.
Dependents: X_NUCLEO_IKS01A1 X_NUCLEO_6180XA1 1-DoorCloser 1-DoorCloser ... more
Fork of X_NUCLEO_COMMON by
Generic mbed Extensions used by STM Expansion Board Firmware Packages
DbgMCU
Helper class DbgMCU
providing a default constructor which enables debugging on STM32 MCUs while using sleep modes.
DevI2C
Helper class DevI2C
providing functions for multi-register I2C communication common for a series of I2C devices.
DevSPI
Helper class DevSPI
providing functions for SPI communication common for a series of SPI devices.
Diff: DevSPI/DevSPI.h
- Revision:
- 17:99d103ca04dd
- Parent:
- 15:a59f32439f9d
- Child:
- 18:06322fe82f27
--- a/DevSPI/DevSPI.h Fri Feb 19 09:33:04 2016 +0100 +++ b/DevSPI/DevSPI.h Wed Jun 08 11:55:20 2016 +0200 @@ -108,7 +108,7 @@ * @note When using the SPI in Interrupt-mode, remember to disable interrupts * before calling this function and to enable them again after. */ - int spi_write(uint8_t* pBuffer, DigitalOut ssel, uint16_t NumBytesToWrite) + int spi_write(uint8_t* pBuffer, DigitalOut &ssel, uint16_t NumBytesToWrite) { /* Check data format */ if(_bits != 8) return -1; @@ -138,7 +138,7 @@ * @note When using the SPI in Interrupt-mode, remember to disable interrupts * before calling this function and to enable them again after. */ - int spi_read(uint8_t* pBuffer, DigitalOut ssel, uint16_t NumBytesToRead) + int spi_read(uint8_t* pBuffer, DigitalOut &ssel, uint16_t NumBytesToRead) { /* Check data format */ if(_bits != 8) return -1; @@ -169,7 +169,7 @@ * @note When using the SPI in Interrupt-mode, remember to disable interrupts * before calling this function and to enable them again after. */ - int spi_read_write(uint8_t* pBufferToRead, uint8_t* pBufferToWrite, DigitalOut ssel, uint16_t NumBytes) + int spi_read_write(uint8_t* pBufferToRead, uint8_t* pBufferToWrite, DigitalOut &ssel, uint16_t NumBytes) { /* Check data format */ if(_bits != 8) return -1; @@ -201,7 +201,7 @@ * @note In order to guarantee this method to work correctly you have to * pass buffers which are correctly aligned. */ - int spi_write(uint16_t* pBuffer, DigitalOut ssel, uint16_t NumValuesToWrite) + int spi_write(uint16_t* pBuffer, DigitalOut &ssel, uint16_t NumValuesToWrite) { /* Check data format */ if(_bits != 16) return -1; @@ -233,7 +233,7 @@ * @note In order to guarantee this method to work correctly you have to * pass buffers which are correctly aligned. */ - int spi_read(uint16_t* pBuffer, DigitalOut ssel, uint16_t NumValuesToRead) + int spi_read(uint16_t* pBuffer, DigitalOut &ssel, uint16_t NumValuesToRead) { /* Check data format */ if(_bits != 16) return -1; @@ -266,7 +266,7 @@ * @note In order to guarantee this method to work correctly you have to * pass buffers which are correctly aligned. */ - int spi_read_write(uint16_t* pBufferToRead, uint16_t* pBufferToWrite, DigitalOut ssel, uint16_t NumValues) + int spi_read_write(uint16_t* pBufferToRead, uint16_t* pBufferToWrite, DigitalOut &ssel, uint16_t NumValues) { /* Check data format */ if(_bits != 16) return -1;