]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/usci/Msp430SpiB1C.nc
Replace the special-purpose Msp430UsciConfigure interface with the
[tinyos-2.x.git] / tos / chips / msp430 / usci / Msp430SpiB1C.nc
index 980f637fb8f21f5731b518540ef79bc7da80f648..9464555f812fde0fc5aa1f6a2fe202d5216f733f 100644 (file)
@@ -38,7 +38,9 @@
 #error "Target does not have a USCI_B1 peripheral (SPI)"
 #endif
 
-configuration Msp430SpiB1C {
+#include "Msp430Usci.h"
+
+generic configuration Msp430SpiB1C() {
   provides {
     interface Resource;
     interface ResourceRequested;
@@ -46,19 +48,20 @@ configuration Msp430SpiB1C {
     interface SpiPacket;
     interface ArbiterInfo; /* ??? */
   }
-  uses interface Msp430UsciSpiConfigure; /* would be nice to use Msp430SpiConfigure, same as USART analog */
+  uses interface AsyncConfigure<const msp430_usci_config_t*> as
+    Msp430UsciConfigure;
 }
 implementation {
   enum {
     CLIENT_ID = unique(MSP430_USCIB1_RESOURCE)
   };
 
-  components Msp430SpiP as SpiP;
+  components new Msp430SpiP() as SpiP;
   SpiByte = SpiP;
   SpiPacket = SpiP;
-  Msp430UsciSpiConfigure = SpiP;
+  Msp430UsciConfigure = SpiP;
 
-  components new Msp430UsciA0C() as UsciC;
+  components Msp430UsciA0C as UsciC;
   Resource = UsciC.Resource[CLIENT_ID];
   ResourceRequested = UsciC.ResourceRequested[CLIENT_ID];
   ArbiterInfo = UsciC.ArbiterInfo;