V148

Fork of RadioHead-148 by David Rimer

Committer:
davidr99
Date:
Thu Oct 15 01:27:00 2015 +0000
Revision:
0:ab4e012489ef
Messy start, but a port for RadioHead.; Currently the SPI modulus are the only ones that work.

Who changed what in which revision?

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