]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/usci/Msp430SpiA0C.nc
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / tos / chips / msp430 / usci / Msp430SpiA0C.nc
index 546c81aea45ec2c00068d99edde2d32e43d4348f..b3c284f2e46912c9d30df1a4b9641b5ddc9128b8 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_A0 in its SPI
  * mode.
@@ -48,9 +48,9 @@
  *
  * The implementation will use a default blockSize if set to 0 here.
  *
- * @author R. Steve McKown <smckown@gmail.com>
+ * @author R. Steve McKown <rsmckown@gmail.com>
  */
+
 #if !defined(__MSP430_HAS_USCI_AB0__)
 #error "Target does not have a USCI_A0 peripheral (SPI)"
 #endif
@@ -65,7 +65,10 @@ generic configuration Msp430SpiA0C(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 Msp430UsciA0C as UsciC;
   Resource = UsciC.Resource[CLIENT_ID];