]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/usci/Msp430SpiB0C.nc
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / tos / chips / msp430 / usci / Msp430SpiB0C.nc
index 6684b79d574d88b568d1e3aa8c9ba7e5c8b2a07d..8da9619f3a17b7a1d495dbc81600f7ff8c650c54 100644 (file)
@@ -26,7 +26,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 /**
  * This configuration provides the interface for using USCI_B0 in its SPI
  * mode.
@@ -50,7 +50,7 @@
  *
  * @author R. Steve McKown <rsmckown@gmail.com>
  */
+
 #if !defined(__MSP430_HAS_USCI_AB0__)
 #error "Target does not have a USCI_B0 peripheral (SPI)"
 #endif
@@ -65,7 +65,10 @@ generic configuration Msp430SpiB0C(uint16_t blockSize) {
     interface SpiPacket;
     interface ArbiterInfo; /* ??? */
   }
-  uses interface AsyncConfigure<const msp430_usci_spi_t*> as Configure;
+  uses {
+    interface AsyncConfigure<const msp430_usci_spi_t*> as Configure;
+    interface GeneralIO as CSn;        /* wire only if a SPI slave only */
+  }
 }
 implementation {
   enum {
@@ -76,6 +79,7 @@ implementation {
   SpiByte = SpiP;
   SpiPacket = SpiP;
   Configure = SpiP;
+  CSn = SpiP;
 
   components Msp430UsciB0C as UsciC;
   Resource = UsciC.Resource[CLIENT_ID];