Lines Matching refs:CANdriverState
85 void CO_CANsetConfigurationMode(void *CANdriverState){ in CO_CANsetConfigurationMode() argument
86 uint16_t C_CTRLcopy = CAN_REG(CANdriverState, C_CTRL); in CO_CANsetConfigurationMode()
91 CAN_REG(CANdriverState, C_CTRL) = C_CTRLcopy; in CO_CANsetConfigurationMode()
94 while((CAN_REG(CANdriverState, C_CTRL) & 0x00E0) != 0x0080); in CO_CANsetConfigurationMode()
100 uint16_t C_CTRLcopy = CAN_REG(CANmodule->CANdriverState, C_CTRL); in CO_CANsetNormalMode()
104 CAN_REG(CANmodule->CANdriverState, C_CTRL) = C_CTRLcopy; in CO_CANsetNormalMode()
107 while((CAN_REG(CANmodule->CANdriverState, C_CTRL) & 0x00E0) != 0x0000); in CO_CANsetNormalMode()
116 void *CANdriverState, in CO_CANmodule_init() argument
131 CANmodule->CANdriverState = CANdriverState; in CO_CANmodule_init()
154 CAN_REG(CANdriverState, C_CTRL) = 0x0400; in CO_CANmodule_init()
171 CAN_REG(CANdriverState, C_CTRL) |= 0x0800; in CO_CANmodule_init()
173 CAN_REG(CANdriverState, C_CFG1) = (CO_CANbitRateData[i].SJW - 1) << 6 | in CO_CANmodule_init()
176 CAN_REG(CANdriverState, C_CFG2) = ((uint16_t)(CO_CANbitRateData[i].phSeg2 - 1)) << 8 | in CO_CANmodule_init()
183 CAN_REG(CANdriverState, C_RXBUF0 + C_RXCON) = 0x0040; in CO_CANmodule_init()
184 CAN_REG(CANdriverState, C_RXBUF1 + C_RXCON) = 0x0000; in CO_CANmodule_init()
185 CAN_REG(CANdriverState, C_TXBUF0 + C_TXCON) = 0x0000; in CO_CANmodule_init()
186 CAN_REG(CANdriverState, C_TXBUF1 + C_TXCON) = 0x0000; in CO_CANmodule_init()
187 CAN_REG(CANdriverState, C_TXBUF2 + C_TXCON) = 0x0000; in CO_CANmodule_init()
191 CAN_REG(CANdriverState, C_RXF0SID) = 0x0000; in CO_CANmodule_init()
192 CAN_REG(CANdriverState, C_RXF1SID) = 0x0000; in CO_CANmodule_init()
193 CAN_REG(CANdriverState, C_RXF2SID) = 0x0000; in CO_CANmodule_init()
194 CAN_REG(CANdriverState, C_RXF3SID) = 0x0000; in CO_CANmodule_init()
195 CAN_REG(CANdriverState, C_RXF4SID) = 0x0000; in CO_CANmodule_init()
196 CAN_REG(CANdriverState, C_RXF5SID) = 0x0000; in CO_CANmodule_init()
200 CAN_REG(CANdriverState, C_RXM0SID) = 0x0001; in CO_CANmodule_init()
201 CAN_REG(CANdriverState, C_RXM1SID) = 0x0001; in CO_CANmodule_init()
206 CAN_REG(CANdriverState, C_INTF) = 0x0000; in CO_CANmodule_init()
208 CAN_REG(CANdriverState, C_INTE) = 0x0007; in CO_CANmodule_init()
217 CO_CANsetConfigurationMode(CANmodule->CANdriverState); in CO_CANmodule_disable()
337 uint16_t addr = CANmodule->CANdriverState; in CO_CANsend()
377 err = CAN_REG(CANmodule->CANdriverState, C_INTF)>>8; in CO_CANverifyErrors()
385 CAN_REG(CANmodule->CANdriverState, C_INTF) &= 0x3FFF;/* clear bits */ in CO_CANverifyErrors()
430 ICODE = CAN_REG(CANmodule->CANdriverState, C_CTRL) & 0xE; in CO_CANinterrupt()
440 rcvMsg = (CO_CANrxMsg_t*) (CANmodule->CANdriverState + C_RXBUF0); in CO_CANinterrupt()
462 CAN_REG(CANmodule->CANdriverState, C_INTF) &= 0xFFFE; in CO_CANinterrupt()
474 rcvMsg = (CO_CANrxMsg_t*) (CANmodule->CANdriverState + C_RXBUF1); in CO_CANinterrupt()
496 CAN_REG(CANmodule->CANdriverState, C_INTF) &= 0xFFFD; in CO_CANinterrupt()
503 CAN_REG(CANmodule->CANdriverState, C_INTF) &= 0xFFFB; in CO_CANinterrupt()
509 …if(CANmodule->CANtxCount > 0U && (CAN_REG(CANmodule->CANdriverState, C_TXBUF0 + C_TXCON) & 0x8) ==… in CO_CANinterrupt()
523 CO_CANsendToModule(CANmodule->CANdriverState + C_TXBUF0, buffer); in CO_CANinterrupt()