51 #include "IfxEray_reg.h"
1141 eray->EIR.U = errorFlag;
1147 eray->SIR.U = statusFlag;
1154 eray->CLC.U = 0x00000100;
1164 Ifx_ERAY_EIR interruptFlags;
1165 interruptFlags.U = eray->EIR.U;
1166 return interruptFlags;
1172 return eray->MRC.B.FFB;
1178 Ifx_ERAY_FSR fifoStatus;
1179 fifoStatus.U = eray->FSR.U;
1186 return (eray->IBCR.B.IBSYH == 1) ?
TRUE :
FALSE;
1192 return (eray->IBCR.B.IBSYS == 1) ?
TRUE :
FALSE;
1198 return &MODULE_SRC.ERAY.ERAY[0].IBUSY;
1204 return &MODULE_SRC.ERAY.ERAY[0].INT[0];
1210 return &MODULE_SRC.ERAY.ERAY[0].INT[1];
1216 uint8 ix = messageBuffer / 32;
1217 uint32 mask = 1 << (messageBuffer % 32);
1218 Ifx_ERAY_MBSC1 *mbscSFR = (Ifx_ERAY_MBSC1 *)((
uint32)&eray->MBSC1 + 4 * ix);
1219 boolean messageBufferInterrupt = (mbscSFR->U & mask) ?
TRUE :
FALSE;
1221 return messageBufferInterrupt;
1227 return &MODULE_SRC.ERAY.ERAY[0].MBSC[0];
1233 return &MODULE_SRC.ERAY.ERAY[0].MBSC[1];
1239 return &MODULE_SRC.ERAY.ERAY[0].NDAT[0];
1245 return &MODULE_SRC.ERAY.ERAY[0].NDAT[1];
1251 uint8 ix = ndat / 32;
1252 uint32 mask = 1 << (ndat % 32);
1253 Ifx_ERAY_NDAT1 *ndatSFR = (Ifx_ERAY_NDAT1 *)((
uint32)&eray->NDAT1 + 4 * ix);
1254 boolean ndatInterrupt = (ndatSFR->U & mask) ?
TRUE :
FALSE;
1256 return ndatInterrupt;
1262 return eray->OBCR.B.OBRH;
1268 return (eray->OBCR.B.OBSYS == 1) ?
TRUE :
FALSE;
1274 return &MODULE_SRC.ERAY.ERAY[0].OBUSY;
1286 Ifx_ERAY_SIR interruptFlags;
1287 interruptFlags.U = eray->SIR.U;
1288 return interruptFlags;
1294 return &MODULE_SRC.ERAY.ERAY[0].TINT[0];
1300 return &MODULE_SRC.ERAY.ERAY[0].TINT[1];
1308 if (eray->SIR.B.WUPA == 1)
1312 else if (eray->SIR.B.WUPB == 1)
1317 return wakeupChannel;
1352 eray->OBCM.B.RDSS = dataReceived;
1358 eray->OBCM.B.RHSS = headerReceived;
1364 eray->IBCM.B.LDSH = dataTransfered;
1370 eray->IBCM.B.LHSH = headerTransfered;
1376 eray->SUCC1.B.PTA = numberOfCyclePairsForActive;
1382 eray->CUST1.B.IEN = 1;
1383 eray->CUST1.B.OEN = 1;
1384 eray->CUST3.U = 0xFFFFFFFF;
1390 eray->PRTC1.B.BRP = baudrate;
1396 eray->MRC.B.SEC = secureValue;
1402 eray->GTUC03.B.UIOA = channelAMicrotickInitialOffset;
1403 eray->GTUC03.B.MIOA = channelAMacrotickInitialOffset;
1409 eray->GTUC03.B.UIOB = channelBMicrotickInitialOffset;
1410 eray->GTUC03.B.MIOB = channelBMacrotickInitialOffset;
1416 eray->GTUC05.B.DCA = channelAReceptionDelay;
1417 eray->GTUC05.B.DCB = channelBReceptionDelay;
1423 Ifx_ERAY_SUCC3 succ3;
1425 succ3.B.WCP = clockCorrectionCyclesPassive;
1426 succ3.B.WCF = clockCorrectionCyclesHalt;
1427 eray->SUCC3.U = succ3.U;
1433 eray->SUCC1.B.HCSE = clockSyncErrorHalt;
1439 eray->GTUC05.B.CDD = clusterDrift;
1440 eray->GTUC06.B.MOD = maxDriftOffset;
1446 eray->GTUC06.B.ASR = acceptedStartupDeviation;
1452 eray->PRTC1.B.CASM = collisionAvoidanceDuration;
1458 eray->GTUC02.B.MPC = macroticks;
1464 eray->GTUC01.U = microticks;
1470 eray->GTUC05.B.DEC = decodingCorrection;
1476 eray->GTUC08.B.MSL = dynamicSlotLength;
1477 eray->GTUC08.B.NMS = dynamicSlotCount;
1478 eray->GTUC09.B.DSI = idleDynamicSlots;
1484 eray->GTUC11.B.EOCC = externalOffset;
1485 eray->GTUC11.B.ERCC = externalRate;
1491 eray->GTUC11.B.EOC = externalOffsetCorrection;
1492 eray->GTUC11.B.ERC = externalRateCorrection;
1499 eray->MRC.B.FFB = fifoBufferStartIndex;
1505 eray->FRF.B.FID = rejectedFrameId;
1506 eray->FRF.B.CYF = filteredCycleNumber;
1507 eray->FRF.B.RNF = fifoNullFramesRejected;
1508 eray->FRFM.B.MFID = frameIdFilter;
1514 eray->FRF.B.CH = receiveChannel;
1515 eray->FRF.B.RSS = staticFifoDisabled;
1516 eray->FCL.U = fifoDepth;
1523 eray->MRC.B.FDB = firstDynamicBuffer;
1529 Ifx_ERAY_SUCC2 succ2;
1531 succ2.B.LT = listenTimeOut;
1532 succ2.B.LTN = listenTimeOutNoise;
1533 eray->SUCC2.U = succ2.U;
1539 eray->SUCC1.B.CSA = maxColdStartAttempts;
1545 eray->GTUC10.B.MOC = maxOffsetCorrection;
1546 eray->GTUC10.B.MRC = maxRateCorrection;
1552 eray->GTUC02.B.SNM = maxSyncFrames;
1558 eray->MRC.B.LCB = numberOfMessageBuffers - 1;
1566 mhdc.B.SFDL = staticFramepayload;
1567 mhdc.B.SLT = latestTransmissionStart;
1568 eray->MHDC.U = mhdc.U;
1574 eray->GTUC04.B.NIT = networkStartIdleTime;
1580 eray->NEMC.U = networkVectorLength;
1586 eray->SUCC1.B.CCHA = channelAConnectedNode;
1587 eray->SUCC1.B.CCHB = channelBConnectedNode;
1593 eray->GTUC04.B.OCS = correctionOffset;
1599 eray->OBCR.B.REQ = receiveRequested;
1605 eray->PRTC1.B.RXW = receiveWakeupTestDuration;
1606 eray->PRTC2.B.RXI = receiveWakeupIdleTime;
1607 eray->PRTC2.B.RXL = receiveWakeupLowTime;
1613 eray->OBCR.B.OBRS = bufferIndex;
1621 eray->CLC.B.EDIS = mode;
1628 eray->GTUC09.B.MAPO = dynamicActionPoint;
1629 eray->GTUC09.B.APO = staticActionPoint;
1635 eray->GTUC07.B.SSL = staticSlotLength;
1636 eray->GTUC07.B.NSS = staticSlotsCount;
1642 eray->PRTC1.B.SPP = strobePosition;
1648 eray->SUCC1.B.MTSA = channelASymbolTransmitted;
1649 eray->SUCC1.B.MTSB = channelBSymbolTransmitted;
1655 eray->SUCC1.B.TSM = transmissionSlotMode;
1661 eray->PRTC1.B.TSST = transmissionStartTime;
1667 eray->IBCM.B.STXRH = transferRequested;
1673 eray->PRTC1.B.RWP = transmitWakeupRepetitions;
1674 eray->PRTC2.B.TXI = transmitWakeupIdleTime;
1675 eray->PRTC2.B.TXL = transmitWakeupLowTime;
1681 eray->SUCC1.B.TXST = startupFrameTransmitted;
1682 eray->SUCC1.B.TXSY = synchFrameTransmitted;
1688 eray->IBCR.B.IBRH = bufferIndex;
1694 eray->OBCR.B.VIEW = swapRequested;
1700 eray->SUCC1.B.WUCS = wakeupPatternChannel;
1706 while (eray->CCSV.B.POCS != (
uint8)pocState)