Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
linenumberstrue
 #include "can_bus.h"

extern  CANBUS_PARA  CanCfg;

void  App_CAN_Startup (void)
{
    CPU_INT16S    can_err;

    ...                                               [1]

    CanBusInit(0L);                                   [2]       /* Initialize CAN Objects & Bus Layer.                  */
    can_err = CanBusEnable((CANBUS_PARA *)&CanCfg);   [3]       /* Enable CAN Device according to Configuration.        */
    if (can_err != CAN_ERR_NONE) {
        while (1);                                    [4]       /* Failure Handling Here.                               */
    }
                                                                /* --------------- uC/OS-III DEMO TASKs --------------- */
    ...                                               [4]
}