Mikroelektronika MIKROE-724 データシート

ページ / 726
302
mikoBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
ECANxGetOperationMode
Prototype
sub function ECANxGetOperationMode() as word
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) then
  ...
end if
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.