--- a/LPCManager.py Fri Nov 21 18:15:53 2014 +0100
+++ b/LPCManager.py Fri Nov 21 20:16:03 2014 +0100
@@ -274,7 +274,7 @@
@@ -285,26 +285,33 @@
int __init_%(location_str)s(int argc,char **argv)
void __cleanup_%(location_str)s(void)
void __retrieve_%(location_str)s(void)
void __publish_%(location_str)s(void)
/* LPCBus confnode includes */
#define RIGHT_READ_BUFSIZE 30 /**< Right bus read buffer size */
#define RIGHT_WRITE_BUFSIZE 30 /**< Right bus write buffer size */
@@ -328,16 +335,58 @@
#define RTSMT_RTIOC_READ _IOR(RTIOC_TYPE_SMT, 0x02, rightReadBuf_t)
#define RTSMT_RTIOC_WRITE _IOR(RTIOC_TYPE_SMT, 0x03, rightWriteBuf_t)
-rightReadBuf_t rightReadBuf;
-rightWriteBuf_t rightWriteBuf;
-rightI2CMod_t rightI2CMod;
+static rightReadBuf_t rightReadBuf; +static rightWriteBuf_t rightWriteBuf; +static rightI2CMod_t rightI2CMod; +static int rightbusfd = -1; /* XXX TODO #include "smarteh.h" */
+#define DEVICEFILENAME "rightbus" +rightbusfd = rt_dev_open( DEVICEFILENAME, 0); + printf("can't open %s rtdm device, %s\\n", DEVICEFILENAME, + strerror(-rightbusfd)); +err = rt_dev_ioctl(rightbusfd, RTSMT_RTIOC_INIT, &rightI2CMod); + printf("error while RTSMT_RTIOC_INIT, %s\\n", + rt_dev_close(rightbusfd); +rt_dev_ioctl(rightbusfd, RTSMT_RTIOC_READ, &rightReadBuf); +rt_dev_ioctl(rightbusfd, RTSMT_RTIOC_WRITE, &rightWriteBuf); +rt_dev_close(rightbusfd); #define MAX_ONBOARD_DEVICES 2
unsigned char onBoardDev[MAX_ONBOARD_DEVICES][2]; /**< Tables containing information about enabled on-board devices (initialized by Composer) */
@@ -461,14 +510,24 @@
location_str = "_".join(map(str, current_location))
BusName = arch + ":" + self.BaseParams.getName()
+ bcode = bus_code.get(BusName,{"decl":"", code_str = {"location_str": location_str,
- "bus_code":bus_code.get(BusName,"")
+ "bus_decl":bcode["decl"], + "bus_init_code": bcode["init"], + "bus_cleanup_code": bcode["cleanup"], + "bus_retrieve_code": bcode["retrieve"], + "bus_publish_code": bcode["publish"], for module in _GetModuleChildren(self):
@@ -793,7 +852,7 @@
target = ProjectController.GetTarget(self)
- if self.CurrentMode != SIMULATION_MODE:
+ if self.CurrentMode != SIMULATION_MODE and arch != "MC9": target.getcontent().setBuildPath(self.BuildPath)