*/
#include "AM.h"
+#include "StorageVolumes.h"
generic configuration FlashVolumeManagerC(am_id_t AMId)
{
#ifdef DELUGE
- provides interface Notify<uint8_t>;
+ provides interface Notify<uint8_t> as DissNotify;
+ provides interface Notify<uint8_t> as ReprogNotify;
#endif
uses {
interface BlockRead[uint8_t img_num];
interface BlockWrite[uint8_t img_num];
+#ifdef DELUGE
interface DelugeStorage[uint8_t img_num];
+#endif
}
}
new FlashVolumeManagerP(),
NoLedsC, LedsC;
- FlashVolumeManagerP.BlockRead[0] = BlockRead[0];
- FlashVolumeManagerP.BlockWrite[0] = BlockWrite[0];
- FlashVolumeManagerP.DelugeStorage[0] = DelugeStorage[0];
- FlashVolumeManagerP.BlockRead[1] = BlockRead[1];
- FlashVolumeManagerP.BlockWrite[1] = BlockWrite[1];
- FlashVolumeManagerP.DelugeStorage[1] = DelugeStorage[1];
+ FlashVolumeManagerP.BlockRead[VOLUME_GOLDENIMAGE] = BlockRead[VOLUME_GOLDENIMAGE];
+ FlashVolumeManagerP.BlockWrite[VOLUME_GOLDENIMAGE] = BlockWrite[VOLUME_GOLDENIMAGE];
+ FlashVolumeManagerP.BlockRead[VOLUME_DELUGE1] = BlockRead[VOLUME_DELUGE1];
+ FlashVolumeManagerP.BlockWrite[VOLUME_DELUGE1] = BlockWrite[VOLUME_DELUGE1];
+ FlashVolumeManagerP.BlockRead[VOLUME_DELUGE2] = BlockRead[VOLUME_DELUGE2];
+ FlashVolumeManagerP.BlockWrite[VOLUME_DELUGE2] = BlockWrite[VOLUME_DELUGE2];
+ FlashVolumeManagerP.BlockRead[VOLUME_DELUGE3] = BlockRead[VOLUME_DELUGE3];
+ FlashVolumeManagerP.BlockWrite[VOLUME_DELUGE3] = BlockWrite[VOLUME_DELUGE3];
+
FlashVolumeManagerP.SerialAMSender -> SerialAMSenderC;
FlashVolumeManagerP.SerialAMReceiver -> SerialAMReceiverC;
- FlashVolumeManagerP.Leds -> LedsC;
+ FlashVolumeManagerP.Leds -> NoLedsC;
#ifdef DELUGE
components NetProgC, new TimerMilliC();
+
FlashVolumeManagerP.NetProg -> NetProgC;
FlashVolumeManagerP.Timer -> TimerMilliC;
-
- Notify = FlashVolumeManagerP.Notify;
+ FlashVolumeManagerP.DelugeStorage[VOLUME_GOLDENIMAGE] = DelugeStorage[VOLUME_GOLDENIMAGE];
+ FlashVolumeManagerP.DelugeStorage[VOLUME_DELUGE1] = DelugeStorage[VOLUME_DELUGE1];
+ FlashVolumeManagerP.DelugeStorage[VOLUME_DELUGE2] = DelugeStorage[VOLUME_DELUGE2];
+ FlashVolumeManagerP.DelugeStorage[VOLUME_DELUGE3] = DelugeStorage[VOLUME_DELUGE3];
+ DissNotify = FlashVolumeManagerP.DissNotify;
+ ReprogNotify = FlashVolumeManagerP.ReprogNotify;
#endif
}