* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
+
/**
* Platform specific pin mapping for the Scp1000.
- *
- * @author R. Steve McKown <smckown@gmail.com>
+ *
+ * @author R. Steve McKown <rsmckown@gmail.com>
*/
-
+
configuration Scp1000PinsC {
provides {
- interface HplMsp430GeneralIO as CSn;
- interface HplMsp430GeneralIO as PD;
- interface HplMsp430GeneralIO as DRDY;
+ interface GeneralIO as CSn;
+ interface GeneralIO as PD;
+ interface GeneralIO as DRDY;
interface GpioInterrupt as IntDRDY;
}
}
implementation {
-#if 0
components new Msp430GpioC() as CSn_;
CSn = CSn_.GeneralIO;
- components new Msp430GpioC() as PD_;
- PD = PD_.GeneralIO;
-
components new Msp430GpioC() as DRDY_;
DRDY = DRDY_.GeneralIO;
-#endif
components new Msp430InterruptC() as IntDRDY_;
IntDRDY = IntDRDY_.Interrupt;
components HplMsp430GeneralIOC as IOC;
-#if 0
CSn_.HplGeneralIO -> IOC.Port43;
- PD_.HplGeneralIO -> IOC.Port42;
DRDY_.HplGeneralIO -> IOC.Port26;
-#else
- CSn = IOC.Port43;
- PD = IOC.Port42;
- DRDY = IOC.Port26;
-#endif
components HplMsp430InterruptC as IntC;
IntDRDY_.HplInterrupt -> IntC.Port26;
+
+ components new Scp1000PinsP() as PinsP;
+ PD = PinsP.PD;
+ PinsP.CSn -> IOC.Port43;
+ PinsP._PD -> IOC.Port42;
+ PinsP.DRDY -> IOC.Port26;
+
+ components MainC;
+ MainC.SoftwareInit -> PinsP;
}