Sog Yang
/
mbed_SPIS_multiByte_example_SOG
Sog update version
Fork of mbed_SPIS_multiByte_example by
Diff: SPISlave_multiByte.cpp
- Revision:
- 2:c520d7c7739d
- Parent:
- 0:b7415ae44dac
- Child:
- 5:6a1155885fc9
diff -r 58f0712d9aa2 -r c520d7c7739d SPISlave_multiByte.cpp --- a/SPISlave_multiByte.cpp Wed May 31 07:39:37 2017 +0000 +++ b/SPISlave_multiByte.cpp Wed May 31 09:30:53 2017 +0000 @@ -41,16 +41,16 @@ spi_frequency_multibyte(&_spi, _hz); } -int SPISlave_multiByte::receive(void) { - return(spi_slave_receive_multibyte(&_spi)); +int SPISlave_multiByte::receive(int bytes) { + return(spi_slave_receive_multibyte(&_spi, bytes)); } int SPISlave_multiByte::read(void) { return(spi_slave_read_multibyte(&_spi)); } -void SPISlave_multiByte::reply(int value) { - spi_slave_write_multibyte(&_spi, value); +void SPISlave_multiByte::reply(uint8_t *value, int bytes) { + spi_slave_write_multibyte(&_spi, value, bytes); } } // namespace mbed