@@ -40,8 +40,8 @@ uint16_t VS1053::read_register(uint8_t _reg) const {
4040 uint16_t result;
4141
4242 control_mode_on ();
43- SPI. write (3 ); // Read operation
44- SPI. write (_reg); // Register to write (0..0xF)
43+ spi_write (3 ); // Read operation
44+ spi_write (_reg); // Register to write (0..0xF)
4545 // Note: transfer16 does not seem to work
4646 result = (SPI.transfer (0xFF ) << 8 ) | // Read 16 bits data
4747 (SPI.transfer (0xFF ));
@@ -52,9 +52,9 @@ uint16_t VS1053::read_register(uint8_t _reg) const {
5252
5353void VS1053::writeRegister (uint8_t _reg, uint16_t _value) const {
5454 control_mode_on ();
55- SPI. write (2 ); // Write operation
56- SPI. write (_reg); // Register to write (0..0xF)
57- SPI. write16 (_value); // Send 16 bits data
55+ spi_write (2 ); // Write operation
56+ spi_write (_reg); // Register to write (0..0xF)
57+ spi_write16 (_value); // Send 16 bits data
5858 await_data_request ();
5959 control_mode_off ();
6060}
@@ -71,7 +71,7 @@ void VS1053::sdi_send_buffer(uint8_t *data, size_t len) {
7171 chunk_length = vs1053_chunk_size;
7272 }
7373 len -= chunk_length;
74- SPI. writeBytes (data, chunk_length);
74+ spi_write_bytes (data, chunk_length);
7575 data += chunk_length;
7676 }
7777 data_mode_off ();
@@ -90,7 +90,7 @@ void VS1053::sdi_send_fillers(size_t len) {
9090 }
9191 len -= chunk_length;
9292 while (chunk_length--) {
93- SPI. write (endFillByte);
93+ spi_write (endFillByte);
9494 }
9595 }
9696 data_mode_off ();
0 commit comments