PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RHGenericSPI.cpp 651B

3 yıl önce
12345678910111213141516171819202122232425262728293031
  1. // RHGenericSPI.cpp
  2. // Author: Mike McCauley (mikem@airspayce.com)
  3. // Copyright (C) 2011 Mike McCauley
  4. // Contributed by Joanna Rutkowska
  5. // $Id: RHGenericSPI.cpp,v 1.2 2014/04/12 05:26:05 mikem Exp $
  6. #include <RHGenericSPI.h>
  7. RHGenericSPI::RHGenericSPI(Frequency frequency, BitOrder bitOrder, DataMode dataMode)
  8. :
  9. _frequency(frequency),
  10. _bitOrder(bitOrder),
  11. _dataMode(dataMode)
  12. {
  13. }
  14. void RHGenericSPI::setBitOrder(BitOrder bitOrder)
  15. {
  16. _bitOrder = bitOrder;
  17. }
  18. void RHGenericSPI::setDataMode(DataMode dataMode)
  19. {
  20. _dataMode = dataMode;
  21. }
  22. void RHGenericSPI::setFrequency(Frequency frequency)
  23. {
  24. _frequency = frequency;
  25. }