PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

32 rindas
651B

  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. }