| 423 | |
| 424 | |
| 425 | int MS5611_SPI::command(const uint8_t command) |
| 426 | { |
| 427 | yield(); |
| 428 | digitalWrite(_select, LOW); |
| 429 | if (_hwSPI) |
| 430 | { |
| 431 | mySPI->beginTransaction(_spi_settings); |
| 432 | mySPI->transfer(command); |
| 433 | mySPI->endTransaction(); |
| 434 | } |
| 435 | else // Software SPI |
| 436 | { |
| 437 | swSPI_transfer(command); |
| 438 | } |
| 439 | digitalWrite(_select, HIGH); |
| 440 | return 0; |
| 441 | } |
| 442 | |
| 443 | |
| 444 | // simple one mode version |