2011-12-22 16:59:50 +01:00
|
|
|
/****************************************************************************
|
2021-06-16 09:22:16 +02:00
|
|
|
* apps/examples/examples/can/can.h
|
2011-12-22 16:59:50 +01:00
|
|
|
*
|
2021-06-15 09:09:58 +02:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2011-12-22 16:59:50 +01:00
|
|
|
*
|
2021-06-15 09:09:58 +02:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2011-12-22 16:59:50 +01:00
|
|
|
*
|
2021-06-15 09:09:58 +02:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2011-12-22 16:59:50 +01:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __APPS_EXAMPLES_CAN_CAN_H
|
|
|
|
#define __APPS_EXAMPLES_CAN_CAN_H
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
|
|
|
|
/****************************************************************************
|
2015-10-02 22:06:11 +02:00
|
|
|
* Pre-processor Definitions
|
2011-12-22 16:59:50 +01:00
|
|
|
****************************************************************************/
|
|
|
|
/* Configuration ************************************************************/
|
|
|
|
/* This test depends on these specific CAN configurations settings (your
|
|
|
|
* specific CAN settings might require additional settings).
|
|
|
|
*
|
|
|
|
* CONFIG_CAN - Enables CAN support.
|
|
|
|
* CONFIG_CAN_LOOPBACK - A CAN driver may or may not support a loopback
|
|
|
|
* mode for testing. The STM32 CAN driver does support loopback mode.
|
|
|
|
*
|
|
|
|
* Specific configuration options for this example include:
|
|
|
|
*
|
|
|
|
* CONFIG_CAN_LOOPBACK
|
|
|
|
* CONFIG_EXAMPLES_CAN_DEVPATH - The path to the CAN device. Default: /dev/can0
|
2019-10-07 10:37:56 +02:00
|
|
|
* CONFIG_EXAMPLES_CAN_NMSGS - This number of CAN message is collected and
|
|
|
|
* the program terminates. Default: 32.
|
2015-11-10 21:13:13 +01:00
|
|
|
* CONFIG_EXAMPLES_CAN_READ - Only receive messages
|
|
|
|
* CONFIG_EXAMPLES_CAN_WRITE - Only send messages
|
|
|
|
* CONFIG_EXAMPLES_CAN_READWRITE - Receive and send messages
|
2011-12-22 16:59:50 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONFIG_CAN
|
|
|
|
# error "CAN device support is not enabled (CONFIG_CAN)"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Public Types
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/****************************************************************************
|
2016-02-22 01:15:00 +01:00
|
|
|
* Public Data
|
2011-12-22 16:59:50 +01:00
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Public Function Prototypes
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#endif /* __APPS_EXAMPLES_CAN_CAN_H */
|