User manual

326
mikoC PRO for dsPIC
MikroElektronika
ECANxGetOperationMode
Prototype
unsigned int ECANxGetOperationMode();
Description The function returns current operation mode of the ECAN module. See ECAN_OP_MODE constants or
device datasheet for operation mode codes.
Parameters None.
Returns Current operation mode.
Requires The ECAN routines are supported only by MCUs with the ECAN module.
Microcontroller must be connected to ECAN transceiver which is connected to the ECAN bus.
Example
// check whether the ECAN1 module is in Normal mode and if it is do
something.
if (ECAN1GetOperationMode() == _ECAN_MODE_NORMAL)
{
...
}
Notes - ECAN library routine require you to specify the module you want to use. To select the desired ECAN
module, simply change the letter x in the routine prototype for a number from 1 to 2.
- Number of ECAN modules per MCU differs from chip to chip. Please, read the appropriate datasheet
before utilizing this library.