2010-08-10 03:11:02 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
< html > < head > < meta http-equiv = "Content-Type" content = "text/html;charset=UTF-8" >
< title > ChibiOS/RT: can_lld.h Source File< / title >
< link href = "custom.css" rel = "stylesheet" type = "text/css" >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" >
< / head > < body >
< table style = "text-align: center; width: 100%;" border = "0"
cellpadding="2" cellspacing="2">
< tbody >
< tr >
< td style = "width: 80px;" > < img alt = "ChibiOS/RT Logo" src = "logo_small.png" > < / td >
< td > < big > < big > ChibiOS/RT< / big > < / big > < br > < br > Architecture - Reference Manual - Guides< / td >
< td style = "width: 80px;" > < / td >
< / tr >
< / tbody >
< / table >
< hr size = "1" >
2010-11-22 05:53:37 +00:00
<!-- Generated by Doxygen 1.7.1 -->
2010-08-10 03:11:02 +00:00
< div class = "navigation" id = "top" >
< div class = "tabs" >
2010-11-22 05:53:37 +00:00
< ul class = "tablist" >
2010-08-10 03:11:02 +00:00
< li > < a href = "main.html" > < span > Main Page< / span > < / a > < / li >
< li > < a href = "modules.html" > < span > Modules< / span > < / a > < / li >
< li > < a href = "annotated.html" > < span > Data Structures< / span > < / a > < / li >
< li class = "current" > < a href = "files.html" > < span > Files< / span > < / a > < / li >
< / ul >
< / div >
2010-11-22 05:53:37 +00:00
< div class = "tabs2" >
< ul class = "tablist" >
2010-08-10 03:11:02 +00:00
< li > < a href = "files.html" > < span > File List< / span > < / a > < / li >
< li > < a href = "globals.html" > < span > Globals< / span > < / a > < / li >
< / ul >
< / div >
2010-11-22 05:53:37 +00:00
< div class = "header" >
< div class = "headertitle" >
< h1 > can_lld.h< / h1 > < / div >
< / div >
< div class = "contents" >
< a href = "templates_2can__lld_8h.html" > Go to the documentation of this file.< / a > < div class = "fragment" > < pre class = "fragment" > < a name = "l00001" > < / a > 00001 < span class = "comment" > /*< / span >
2010-08-10 03:11:02 +00:00
< a name = "l00002" > < / a > 00002 < span class = "comment" > ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.< / span >
< a name = "l00003" > < / a > 00003 < span class = "comment" > < / span >
< a name = "l00004" > < / a > 00004 < span class = "comment" > This file is part of ChibiOS/RT.< / span >
< a name = "l00005" > < / a > 00005 < span class = "comment" > < / span >
< a name = "l00006" > < / a > 00006 < span class = "comment" > ChibiOS/RT is free software; you can redistribute it and/or modify< / span >
< a name = "l00007" > < / a > 00007 < span class = "comment" > it under the terms of the GNU General Public License as published by< / span >
< a name = "l00008" > < / a > 00008 < span class = "comment" > the Free Software Foundation; either version 3 of the License, or< / span >
< a name = "l00009" > < / a > 00009 < span class = "comment" > (at your option) any later version.< / span >
< a name = "l00010" > < / a > 00010 < span class = "comment" > < / span >
< a name = "l00011" > < / a > 00011 < span class = "comment" > ChibiOS/RT is distributed in the hope that it will be useful,< / span >
< a name = "l00012" > < / a > 00012 < span class = "comment" > but WITHOUT ANY WARRANTY; without even the implied warranty of< / span >
< a name = "l00013" > < / a > 00013 < span class = "comment" > MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the< / span >
< a name = "l00014" > < / a > 00014 < span class = "comment" > GNU General Public License for more details.< / span >
< a name = "l00015" > < / a > 00015 < span class = "comment" > < / span >
< a name = "l00016" > < / a > 00016 < span class = "comment" > You should have received a copy of the GNU General Public License< / span >
< a name = "l00017" > < / a > 00017 < span class = "comment" > along with this program. If not, see < http://www.gnu.org/licenses/> .< / span >
< a name = "l00018" > < / a > 00018 < span class = "comment" > < / span >
< a name = "l00019" > < / a > 00019 < span class = "comment" > ---< / span >
< a name = "l00020" > < / a > 00020 < span class = "comment" > < / span >
< a name = "l00021" > < / a > 00021 < span class = "comment" > A special exception to the GPL can be applied should you wish to distribute< / span >
< a name = "l00022" > < / a > 00022 < span class = "comment" > a combined work that includes ChibiOS/RT, without being obliged to provide< / span >
< a name = "l00023" > < / a > 00023 < span class = "comment" > the source code for any proprietary components. See the file exception.txt< / span >
< a name = "l00024" > < / a > 00024 < span class = "comment" > for full details of how and when the exception can be applied.< / span >
< a name = "l00025" > < / a > 00025 < span class = "comment" > */< / span >
< a name = "l00026" > < / a > 00026 < span class = "comment" > < / span >
< a name = "l00027" > < / a > 00027 < span class = "comment" > /**< / span >
< a name = "l00028" > < / a > 00028 < span class = "comment" > * @file templates/can_lld.h< / span >
< a name = "l00029" > < / a > 00029 < span class = "comment" > * @brief CAN Driver subsystem low level driver header template.< / span >
< a name = "l00030" > < / a > 00030 < span class = "comment" > *< / span >
< a name = "l00031" > < / a > 00031 < span class = "comment" > * @addtogroup CAN_LLD< / span >
< a name = "l00032" > < / a > 00032 < span class = "comment" > * @{< / span >
< a name = "l00033" > < / a > 00033 < span class = "comment" > */< / span >
< a name = "l00034" > < / a > 00034
< a name = "l00035" > < / a > 00035 < span class = "preprocessor" > #ifndef _CAN_LLD_H_< / span >
< a name = "l00036" > < / a > 00036 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define _CAN_LLD_H_< / span >
< a name = "l00037" > < / a > 00037 < span class = "preprocessor" > < / span >
< a name = "l00038" > < / a > 00038 < span class = "preprocessor" > #if CH_HAL_USE_CAN || defined(__DOXYGEN__)< / span >
< a name = "l00039" > < / a > 00039 < span class = "preprocessor" > < / span >
< a name = "l00040" > < / a > 00040 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00041" > < / a > 00041 < span class = "comment" > /* Driver constants. */< / span >
< a name = "l00042" > < / a > 00042 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00043" > < / a > 00043 < span class = "comment" > < / span >
< a name = "l00044" > < / a > 00044 < span class = "comment" > /**< / span >
< a name = "l00045" > < / a > 00045 < span class = "comment" > * @brief This switch defines whether the driver implementation supports< / span >
< a name = "l00046" > < / a > 00046 < span class = "comment" > * a low power switch mode with automatic an wakeup feature.< / span >
< a name = "l00047" > < / a > 00047 < span class = "comment" > */< / span >
< a name = "l00048" > < / a > < a class = "code" href = "group___c_a_n___l_l_d.html#gaa9218b87c481680e99f7ffe90b7bad82" > 00048< / a > < span class = "preprocessor" > #define CAN_SUPPORTS_SLEEP TRUE< / span >
< a name = "l00049" > < / a > 00049 < span class = "preprocessor" > < / span >
< a name = "l00050" > < / a > 00050 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00051" > < / a > 00051 < span class = "comment" > /* Driver pre-compile time settings. */< / span >
< a name = "l00052" > < / a > 00052 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00053" > < / a > 00053 < span class = "comment" > < / span >
< a name = "l00054" > < / a > 00054 < span class = "comment" > /**< / span >
< a name = "l00055" > < / a > 00055 < span class = "comment" > * @brief Sleep mode related APIs inclusion switch.< / span >
< a name = "l00056" > < / a > 00056 < span class = "comment" > * @note This switch is enforced to @p FALSE if the driver implementation< / span >
< a name = "l00057" > < / a > 00057 < span class = "comment" > * does not support the sleep mode.< / span >
< a name = "l00058" > < / a > 00058 < span class = "comment" > */< / span >
< a name = "l00059" > < / a > 00059 < span class = "preprocessor" > #if CAN_SUPPORTS_SLEEP || defined(__DOXYGEN__)< / span >
< a name = "l00060" > < / a > 00060 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)< / span >
< a name = "l00061" > < / a > < a class = "code" href = "group___c_a_n___l_l_d.html#ga5294d9d12e4186c781df3b2f1d8bd80b" > 00061< / a > < span class = "preprocessor" > < / span > < span class = "preprocessor" > #define CAN_USE_SLEEP_MODE TRUE< / span >
< a name = "l00062" > < / a > 00062 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #endif< / span >
< a name = "l00063" > < / a > 00063 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #else < / span > < span class = "comment" > /* !CAN_SUPPORTS_SLEEP */< / span >
< a name = "l00064" > < / a > 00064 < span class = "preprocessor" > #define CAN_USE_SLEEP_MODE FALSE< / span >
< a name = "l00065" > < / a > 00065 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #endif < / span > < span class = "comment" > /* !CAN_SUPPORTS_SLEEP */< / span >
< a name = "l00066" > < / a > 00066
< a name = "l00067" > < / a > 00067 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00068" > < / a > 00068 < span class = "comment" > /* Derived constants and error checks. */< / span >
< a name = "l00069" > < / a > 00069 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00070" > < / a > 00070
< a name = "l00071" > < / a > 00071 < span class = "preprocessor" > #if CAN_USE_SLEEP_MODE & & !CAN_SUPPORTS_SLEEP< / span >
< a name = "l00072" > < / a > 00072 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #error " CAN sleep mode not supported in this architecture" < / span >
< a name = "l00073" > < / a > 00073 < span class = "preprocessor" > < / span > < span class = "preprocessor" > #endif< / span >
< a name = "l00074" > < / a > 00074 < span class = "preprocessor" > < / span >
< a name = "l00075" > < / a > 00075 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00076" > < / a > 00076 < span class = "comment" > /* Driver data structures and types. */< / span >
< a name = "l00077" > < / a > 00077 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00078" > < / a > 00078 < span class = "comment" > < / span >
< a name = "l00079" > < / a > 00079 < span class = "comment" > /**< / span >
< a name = "l00080" > < / a > 00080 < span class = "comment" > * @brief CAN status flags.< / span >
< a name = "l00081" > < / a > 00081 < span class = "comment" > */< / span >
2010-11-22 05:53:37 +00:00
< a name = "l00082" > < / a > < a class = "code" href = "group___c_a_n___l_l_d.html#ga4a6894bc11434dfa96263dcd72735330" > 00082< / a > < span class = "keyword" > typedef< / span > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#ga06896e8c53f721507066c079052171f8" > uint32_t< / a > canstatus_t;
2010-08-10 03:11:02 +00:00
< a name = "l00083" > < / a > 00083 < span class = "comment" > < / span >
< a name = "l00084" > < / a > 00084 < span class = "comment" > /**< / span >
< a name = "l00085" > < / a > 00085 < span class = "comment" > * @brief CAN transmission frame.< / span >
< a name = "l00086" > < / a > 00086 < span class = "comment" > * @note Accessing the frame data as word16 or word32 is not portable< / span >
< a name = "l00087" > < / a > 00087 < span class = "comment" > * because machine data endianness, it can be still useful for a< / span >
< a name = "l00088" > < / a > 00088 < span class = "comment" > * quick filling.< / span >
< a name = "l00089" > < / a > 00089 < span class = "comment" > */< / span >
< a name = "l00090" > < / a > < a class = "code" href = "struct_c_a_n_tx_frame.html" > 00090< / a > < span class = "keyword" > typedef< / span > < span class = "keyword" > struct < / span > {
< a name = "l00091" > < / a > 00091 < span class = "keyword" > struct < / span > {
< a name = "l00092" > < / a > < a class = "code" href = "struct_c_a_n_tx_frame.html#ac81537af48267da48dbe23a4294a18eb" > 00092< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#gaba7bc1797add20fe3efdf37ced1182c5" > uint8_t< / a > cf_DLC:4; < span class = "comment" > /**< @brief Data length. */< / span >
< a name = "l00093" > < / a > < a class = "code" href = "struct_c_a_n_tx_frame.html#a3c89f59b84d3219068e87f1d895093f9" > 00093< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#gaba7bc1797add20fe3efdf37ced1182c5" > uint8_t< / a > cf_RTR:1; < span class = "comment" > /**< @brief Frame type. */< / span >
< a name = "l00094" > < / a > < a class = "code" href = "struct_c_a_n_tx_frame.html#aa4ebb8173674ca7e08d4ddb5fac89bb9" > 00094< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#gaba7bc1797add20fe3efdf37ced1182c5" > uint8_t< / a > cf_IDE:1; < span class = "comment" > /**< @brief Identifier type. */< / span >
< a name = "l00095" > < / a > 00095 };
< a name = "l00096" > < / a > 00096 < span class = "keyword" > union < / span > {
< a name = "l00097" > < / a > 00097 < span class = "keyword" > struct < / span > {
< a name = "l00098" > < / a > < a class = "code" href = "struct_c_a_n_tx_frame.html#ac11837b37f41b24eadd4d430bc5f552c" > 00098< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#ga06896e8c53f721507066c079052171f8" > uint32_t< / a > cf_SID:11; < span class = "comment" > /**< @brief Standard identifier.*/< / span >
< a name = "l00099" > < / a > 00099 };
< a name = "l00100" > < / a > 00100 < span class = "keyword" > struct < / span > {
< a name = "l00101" > < / a > < a class = "code" href = "struct_c_a_n_tx_frame.html#a9a855b7a1c0d0f278629748567afa158" > 00101< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#ga06896e8c53f721507066c079052171f8" > uint32_t< / a > cf_EID:29; < span class = "comment" > /**< @brief Extended identifier.*/< / span >
< a name = "l00102" > < / a > 00102 };
< a name = "l00103" > < / a > 00103 };
< a name = "l00104" > < / a > 00104 < span class = "keyword" > union < / span > {
< a name = "l00105" > < / a > < a class = "code" href = "struct_c_a_n_tx_frame.html#a651cd067383ace3839127e1bd8be30fe" > 00105< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#gaba7bc1797add20fe3efdf37ced1182c5" > uint8_t< / a > cf_data8[8]; < span class = "comment" > /**< @brief Frame data. */< / span >
< a name = "l00106" > < / a > < a class = "code" href = "struct_c_a_n_tx_frame.html#af4de849664d49aa8661a1f21fd3bb274" > 00106< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#ga1f1825b69244eb3ad2c7165ddc99c956" > uint16_t< / a > cf_data16[4]; < span class = "comment" > /**< @brief Frame data. */< / span >
< a name = "l00107" > < / a > < a class = "code" href = "struct_c_a_n_tx_frame.html#a4f02bd88888d8f2d0e0f46f69df4a4a8" > 00107< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#ga06896e8c53f721507066c079052171f8" > uint32_t< / a > cf_data32[2]; < span class = "comment" > /**< @brief Frame data. */< / span >
< a name = "l00108" > < / a > 00108 };
< a name = "l00109" > < / a > 00109 } < a class = "code" href = "struct_c_a_n_tx_frame.html" title = "CAN transmission frame." > CANTxFrame< / a > ;
< a name = "l00110" > < / a > 00110 < span class = "comment" > < / span >
< a name = "l00111" > < / a > 00111 < span class = "comment" > /**< / span >
< a name = "l00112" > < / a > 00112 < span class = "comment" > * @brief CAN received frame.< / span >
< a name = "l00113" > < / a > 00113 < span class = "comment" > * @note Accessing the frame data as word16 or word32 is not portable< / span >
< a name = "l00114" > < / a > 00114 < span class = "comment" > * because machine data endianness, it can be still useful for a< / span >
< a name = "l00115" > < / a > 00115 < span class = "comment" > * quick filling.< / span >
< a name = "l00116" > < / a > 00116 < span class = "comment" > */< / span >
< a name = "l00117" > < / a > < a class = "code" href = "struct_c_a_n_rx_frame.html" > 00117< / a > < span class = "keyword" > typedef< / span > < span class = "keyword" > struct < / span > {
< a name = "l00118" > < / a > 00118 < span class = "keyword" > struct < / span > {
< a name = "l00119" > < / a > < a class = "code" href = "struct_c_a_n_rx_frame.html#a282b0ab7bcd2a150af45aa796ed1e966" > 00119< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#gaba7bc1797add20fe3efdf37ced1182c5" > uint8_t< / a > cf_DLC:4; < span class = "comment" > /**< @brief Data length. */< / span >
< a name = "l00120" > < / a > < a class = "code" href = "struct_c_a_n_rx_frame.html#a2fcc955710ecb7eb9c4c50b0fe265b94" > 00120< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#gaba7bc1797add20fe3efdf37ced1182c5" > uint8_t< / a > cf_RTR:1; < span class = "comment" > /**< @brief Frame type. */< / span >
< a name = "l00121" > < / a > < a class = "code" href = "struct_c_a_n_rx_frame.html#a88afcf551427996e510b8c655c8468a4" > 00121< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#gaba7bc1797add20fe3efdf37ced1182c5" > uint8_t< / a > cf_IDE:1; < span class = "comment" > /**< @brief Identifier type. */< / span >
< a name = "l00122" > < / a > 00122 };
< a name = "l00123" > < / a > 00123 < span class = "keyword" > union < / span > {
< a name = "l00124" > < / a > 00124 < span class = "keyword" > struct < / span > {
< a name = "l00125" > < / a > < a class = "code" href = "struct_c_a_n_rx_frame.html#aceb7cdd57242daccea535eb6c40f0f93" > 00125< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#ga06896e8c53f721507066c079052171f8" > uint32_t< / a > cf_SID:11; < span class = "comment" > /**< @brief Standard identifier.*/< / span >
< a name = "l00126" > < / a > 00126 };
< a name = "l00127" > < / a > 00127 < span class = "keyword" > struct < / span > {
< a name = "l00128" > < / a > < a class = "code" href = "struct_c_a_n_rx_frame.html#ae6ac1c1fadee09c5479c54b83d144f01" > 00128< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#ga06896e8c53f721507066c079052171f8" > uint32_t< / a > cf_EID:29; < span class = "comment" > /**< @brief Extended identifier.*/< / span >
< a name = "l00129" > < / a > 00129 };
< a name = "l00130" > < / a > 00130 };
< a name = "l00131" > < / a > 00131 < span class = "keyword" > union < / span > {
< a name = "l00132" > < / a > < a class = "code" href = "struct_c_a_n_rx_frame.html#a47298bdeb9d056a41e82fd9b03139ab1" > 00132< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#gaba7bc1797add20fe3efdf37ced1182c5" > uint8_t< / a > cf_data8[8]; < span class = "comment" > /**< @brief Frame data. */< / span >
< a name = "l00133" > < / a > < a class = "code" href = "struct_c_a_n_rx_frame.html#a349620e3e90dbc483dda13c00ee1bc57" > 00133< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#ga1f1825b69244eb3ad2c7165ddc99c956" > uint16_t< / a > cf_data16[4]; < span class = "comment" > /**< @brief Frame data. */< / span >
< a name = "l00134" > < / a > < a class = "code" href = "struct_c_a_n_rx_frame.html#ab86224aa99e94df216308d497d4f9589" > 00134< / a > < a class = "code" href = "group___s_t_m8___c_o_r_e.html#ga06896e8c53f721507066c079052171f8" > uint32_t< / a > cf_data32[2]; < span class = "comment" > /**< @brief Frame data. */< / span >
< a name = "l00135" > < / a > 00135 };
< a name = "l00136" > < / a > 00136 } < a class = "code" href = "struct_c_a_n_rx_frame.html" title = "CAN received frame." > CANRxFrame< / a > ;
< a name = "l00137" > < / a > 00137 < span class = "comment" > < / span >
< a name = "l00138" > < / a > 00138 < span class = "comment" > /**< / span >
< a name = "l00139" > < / a > 00139 < span class = "comment" > * @brief CAN filter.< / span >
< a name = "l00140" > < / a > 00140 < span class = "comment" > * @note It could not be present on some architectures.< / span >
< a name = "l00141" > < / a > 00141 < span class = "comment" > */< / span >
< a name = "l00142" > < / a > < a class = "code" href = "struct_c_a_n_filter.html" > 00142< / a > < span class = "keyword" > typedef< / span > < span class = "keyword" > struct < / span > {
< a name = "l00143" > < / a > 00143 } < a class = "code" href = "struct_c_a_n_filter.html" title = "CAN filter." > CANFilter< / a > ;
< a name = "l00144" > < / a > 00144 < span class = "comment" > < / span >
< a name = "l00145" > < / a > 00145 < span class = "comment" > /**< / span >
< a name = "l00146" > < / a > 00146 < span class = "comment" > * @brief Driver configuration structure.< / span >
< a name = "l00147" > < / a > 00147 < span class = "comment" > * @note It could be empty on some architectures.< / span >
< a name = "l00148" > < / a > 00148 < span class = "comment" > */< / span >
< a name = "l00149" > < / a > < a class = "code" href = "struct_c_a_n_config.html" > 00149< / a > < span class = "keyword" > typedef< / span > < span class = "keyword" > struct < / span > {
< a name = "l00150" > < / a > 00150 } < a class = "code" href = "struct_c_a_n_config.html" title = "Driver configuration structure." > CANConfig< / a > ;
< a name = "l00151" > < / a > 00151 < span class = "comment" > < / span >
< a name = "l00152" > < / a > 00152 < span class = "comment" > /**< / span >
< a name = "l00153" > < / a > 00153 < span class = "comment" > * @brief Structure representing an CAN driver.< / span >
< a name = "l00154" > < / a > 00154 < span class = "comment" > */< / span >
< a name = "l00155" > < / a > < a class = "code" href = "struct_c_a_n_driver.html" > 00155< / a > < span class = "keyword" > typedef< / span > < span class = "keyword" > struct < / span > {< span class = "comment" > < / span >
< a name = "l00156" > < / a > 00156 < span class = "comment" > /**< / span >
< a name = "l00157" > < / a > 00157 < span class = "comment" > * @brief Driver state.< / span >
< a name = "l00158" > < / a > 00158 < span class = "comment" > */< / span >
< a name = "l00159" > < / a > < a class = "code" href = "struct_c_a_n_driver.html#a5ed8f92d00941a212ad798e05c001dcb" > 00159< / a > < a class = "code" href = "group___c_a_n.html#gaca62464ffdcedae03d49adf3f6ce870e" title = "Driver state machine possible states." > canstate_t< / a > cd_state;< span class = "comment" > < / span >
< a name = "l00160" > < / a > 00160 < span class = "comment" > /**< / span >
< a name = "l00161" > < / a > 00161 < span class = "comment" > * @brief Current configuration data.< / span >
< a name = "l00162" > < / a > 00162 < span class = "comment" > */< / span >
< a name = "l00163" > < / a > < a class = "code" href = "struct_c_a_n_driver.html#a06a64e755c1b87bf9f8156d7d19a4e41" > 00163< / a > < span class = "keyword" > const< / span > < a class = "code" href = "struct_c_a_n_config.html" title = "Driver configuration structure." > CANConfig< / a > *cd_config;< span class = "comment" > < / span >
< a name = "l00164" > < / a > 00164 < span class = "comment" > /**< / span >
< a name = "l00165" > < / a > 00165 < span class = "comment" > * @brief Transmission queue semaphore.< / span >
< a name = "l00166" > < / a > 00166 < span class = "comment" > */< / span >
< a name = "l00167" > < / a > < a class = "code" href = "struct_c_a_n_driver.html#a2d4f41efdd17ff64233fd636873601c7" > 00167< / a > < a class = "code" href = "struct_semaphore.html" title = "Semaphore structure." > Semaphore< / a > cd_txsem;< span class = "comment" > < / span >
< a name = "l00168" > < / a > 00168 < span class = "comment" > /**< / span >
< a name = "l00169" > < / a > 00169 < span class = "comment" > * @brief Receive queue semaphore.< / span >
< a name = "l00170" > < / a > 00170 < span class = "comment" > */< / span >
< a name = "l00171" > < / a > < a class = "code" href = "struct_c_a_n_driver.html#aae5656b95d7632b579d098e95c3c77d4" > 00171< / a > < a class = "code" href = "struct_semaphore.html" title = "Semaphore structure." > Semaphore< / a > cd_rxsem;< span class = "comment" > < / span >
< a name = "l00172" > < / a > 00172 < span class = "comment" > /**< / span >
< a name = "l00173" > < / a > 00173 < span class = "comment" > * @brief One or more frames become available.< / span >
< a name = "l00174" > < / a > 00174 < span class = "comment" > * @note After broadcasting this event it will not be broadcasted again< / span >
< a name = "l00175" > < / a > 00175 < span class = "comment" > * until the received frames queue has been completely emptied. It< / span >
< a name = "l00176" > < / a > 00176 < span class = "comment" > * is < b> not< /b> broadcasted for each received frame. It is< / span >
< a name = "l00177" > < / a > 00177 < span class = "comment" > * responsibility of the application to empty the queue by repeatedly< / span >
< a name = "l00178" > < / a > 00178 < span class = "comment" > * invoking @p chReceive() when listening to this event. This behavior< / span >
< a name = "l00179" > < / a > 00179 < span class = "comment" > * minimizes the interrupt served by the system because CAN traffic.< / span >
< a name = "l00180" > < / a > 00180 < span class = "comment" > */< / span >
< a name = "l00181" > < / a > < a class = "code" href = "struct_c_a_n_driver.html#af26143d0b9fed9421e79fa4fcb7f3d4b" > 00181< / a > < a class = "code" href = "struct_event_source.html" title = "Event Source structure." > EventSource< / a > cd_rxfull_event;< span class = "comment" > < / span >
< a name = "l00182" > < / a > 00182 < span class = "comment" > /**< / span >
< a name = "l00183" > < / a > 00183 < span class = "comment" > * @brief One or more transmission slots become available.< / span >
< a name = "l00184" > < / a > 00184 < span class = "comment" > */< / span >
< a name = "l00185" > < / a > < a class = "code" href = "struct_c_a_n_driver.html#a39538106afd16adf6e1b2640458f5fa2" > 00185< / a > < a class = "code" href = "struct_event_source.html" title = "Event Source structure." > EventSource< / a > cd_txempty_event;< span class = "comment" > < / span >
< a name = "l00186" > < / a > 00186 < span class = "comment" > /**< / span >
< a name = "l00187" > < / a > 00187 < span class = "comment" > * @brief A CAN bus error happened.< / span >
< a name = "l00188" > < / a > 00188 < span class = "comment" > */< / span >
< a name = "l00189" > < / a > < a class = "code" href = "struct_c_a_n_driver.html#aa4bc47b7806c2414382071f31b0cef89" > 00189< / a > < a class = "code" href = "struct_event_source.html" title = "Event Source structure." > EventSource< / a > cd_error_event;< span class = "comment" > < / span >
< a name = "l00190" > < / a > 00190 < span class = "comment" > /**< / span >
< a name = "l00191" > < / a > 00191 < span class = "comment" > * @brief Error flags set when an error event is broadcasted.< / span >
< a name = "l00192" > < / a > 00192 < span class = "comment" > */< / span >
< a name = "l00193" > < / a > < a class = "code" href = "struct_c_a_n_driver.html#a149df5bb5907beae27b8623d432cb20a" > 00193< / a > < a class = "code" href = "group___c_a_n___l_l_d.html#ga4a6894bc11434dfa96263dcd72735330" title = "CAN status flags." > canstatus_t< / a > cd_status;
< a name = "l00194" > < / a > 00194 < span class = "preprocessor" > #if CAN_USE_SLEEP_MODE || defined (__DOXYGEN__)< / span >
< a name = "l00195" > < / a > 00195 < span class = "preprocessor" > < / span > < span class = "comment" > /**< / span >
< a name = "l00196" > < / a > 00196 < span class = "comment" > * @brief Entering sleep state event.< / span >
< a name = "l00197" > < / a > 00197 < span class = "comment" > */< / span >
< a name = "l00198" > < / a > < a class = "code" href = "struct_c_a_n_driver.html#a424d4fd0c061b0237803c03c5815b450" > 00198< / a > < a class = "code" href = "struct_event_source.html" title = "Event Source structure." > EventSource< / a > cd_sleep_event;< span class = "comment" > < / span >
< a name = "l00199" > < / a > 00199 < span class = "comment" > /**< / span >
< a name = "l00200" > < / a > 00200 < span class = "comment" > * @brief Exiting sleep state event.< / span >
< a name = "l00201" > < / a > 00201 < span class = "comment" > */< / span >
< a name = "l00202" > < / a > < a class = "code" href = "struct_c_a_n_driver.html#ab860f0342e594220bd9428bed397614e" > 00202< / a > < a class = "code" href = "struct_event_source.html" title = "Event Source structure." > EventSource< / a > cd_wakeup_event;
< a name = "l00203" > < / a > 00203 < span class = "preprocessor" > #endif < / span > < span class = "comment" > /* CAN_USE_SLEEP_MODE */< / span >
< a name = "l00204" > < / a > 00204 < span class = "comment" > /* End of the mandatory fields.*/< / span >
< a name = "l00205" > < / a > 00205 } < a class = "code" href = "struct_c_a_n_driver.html" title = "Structure representing an CAN driver." > CANDriver< / a > ;
< a name = "l00206" > < / a > 00206
< a name = "l00207" > < / a > 00207 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00208" > < / a > 00208 < span class = "comment" > /* Driver macros. */< / span >
< a name = "l00209" > < / a > 00209 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00210" > < / a > 00210
< a name = "l00211" > < / a > 00211 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00212" > < / a > 00212 < span class = "comment" > /* External declarations. */< / span >
< a name = "l00213" > < / a > 00213 < span class = "comment" > /*===========================================================================*/< / span >
< a name = "l00214" > < / a > 00214
< a name = "l00215" > < / a > 00215 < span class = "preprocessor" > #ifdef __cplusplus< / span >
< a name = "l00216" > < / a > 00216 < span class = "preprocessor" > < / span > < span class = "keyword" > extern< / span > < span class = "stringliteral" > " C" < / span > {
< a name = "l00217" > < / a > 00217 < span class = "preprocessor" > #endif< / span >
< a name = "l00218" > < / a > 00218 < span class = "preprocessor" > < / span > < span class = "keywordtype" > void< / span > < a class = "code" href = "group___c_a_n___l_l_d.html#gaa215539c505ce7099f30c0aace00bf25" title = "Low level CAN driver initialization." > can_lld_init< / a > (< span class = "keywordtype" > void< / span > );
< a name = "l00219" > < / a > 00219 < span class = "keywordtype" > void< / span > < a class = "code" href = "group___c_a_n___l_l_d.html#gafae65e8b034b2c1cda8d46790eb2c3fb" title = "Configures and activates the CAN peripheral." > can_lld_start< / a > (< a class = "code" href = "struct_c_a_n_driver.html" title = "Structure representing an CAN driver." > CANDriver< / a > *canp);
< a name = "l00220" > < / a > 00220 < span class = "keywordtype" > void< / span > < a class = "code" href = "group___c_a_n___l_l_d.html#gad6fff809711eb161f9c53acf4f3f8470" title = "Deactivates the CAN peripheral." > can_lld_stop< / a > (< a class = "code" href = "struct_c_a_n_driver.html" title = "Structure representing an CAN driver." > CANDriver< / a > *canp);
< a name = "l00221" > < / a > 00221 < a class = "code" href = "group__types.html#ga7556af1cb61728b53228fa3af1c851de" title = "Boolean, recommended the fastest signed." > bool_t< / a > < a class = "code" href = "group___c_a_n___l_l_d.html#ga81f2cbcb7b885628bdf54177375b7f9b" title = "Determines whether a frame can be transmitted." > can_lld_can_transmit< / a > (< a class = "code" href = "struct_c_a_n_driver.html" title = "Structure representing an CAN driver." > CANDriver< / a > *canp);
< a name = "l00222" > < / a > 00222 < span class = "keywordtype" > void< / span > < a class = "code" href = "group___c_a_n___l_l_d.html#ga7117eccbe00b5524e55546a4aa688446" title = "Inserts a frame into the transmit queue." > can_lld_transmit< / a > (< a class = "code" href = "struct_c_a_n_driver.html" title = "Structure representing an CAN driver." > CANDriver< / a > *canp, < span class = "keyword" > const< / span > < a class = "code" href = "struct_c_a_n_tx_frame.html" title = "CAN transmission frame." > CANTxFrame< / a > *crfp);
< a name = "l00223" > < / a > 00223 < a class = "code" href = "group__types.html#ga7556af1cb61728b53228fa3af1c851de" title = "Boolean, recommended the fastest signed." > bool_t< / a > < a class = "code" href = "group___c_a_n___l_l_d.html#ga27ca2bb8369163a8be3ebd020522f7b0" title = "Determines whether a frame has been received." > can_lld_can_receive< / a > (< a class = "code" href = "struct_c_a_n_driver.html" title = "Structure representing an CAN driver." > CANDriver< / a > *canp);
< a name = "l00224" > < / a > 00224 < span class = "keywordtype" > void< / span > < a class = "code" href = "group___c_a_n___l_l_d.html#ga5c9d83ee107cfb59880c4bd19a7961bd" title = "Receives a frame from the input queue." > can_lld_receive< / a > (< a class = "code" href = "struct_c_a_n_driver.html" title = "Structure representing an CAN driver." > CANDriver< / a > *canp, < a class = "code" href = "struct_c_a_n_rx_frame.html" title = "CAN received frame." > CANRxFrame< / a > *ctfp);
< a name = "l00225" > < / a > 00225 < span class = "preprocessor" > #if CAN_USE_SLEEP_MODE< / span >
< a name = "l00226" > < / a > 00226 < span class = "preprocessor" > < / span > < span class = "keywordtype" > void< / span > < a class = "code" href = "group___c_a_n___l_l_d.html#ga90f2254324f338714bfe1663eb73a2ba" title = "Enters the sleep mode." > can_lld_sleep< / a > (< a class = "code" href = "struct_c_a_n_driver.html" title = "Structure representing an CAN driver." > CANDriver< / a > *canp);
< a name = "l00227" > < / a > 00227 < span class = "keywordtype" > void< / span > < a class = "code" href = "group___c_a_n___l_l_d.html#ga7a5e18d180ae064548783e6ac18903ba" title = "Enforces leaving the sleep mode." > can_lld_wakeup< / a > (< a class = "code" href = "struct_c_a_n_driver.html" title = "Structure representing an CAN driver." > CANDriver< / a > *canp);
< a name = "l00228" > < / a > 00228 < span class = "preprocessor" > #endif < / span > < span class = "comment" > /* CAN_USE_SLEEP_MODE */< / span >
< a name = "l00229" > < / a > 00229 < span class = "preprocessor" > #ifdef __cplusplus< / span >
< a name = "l00230" > < / a > 00230 < span class = "preprocessor" > < / span > }
< a name = "l00231" > < / a > 00231 < span class = "preprocessor" > #endif< / span >
< a name = "l00232" > < / a > 00232 < span class = "preprocessor" > < / span >
< a name = "l00233" > < / a > 00233 < span class = "preprocessor" > #endif < / span > < span class = "comment" > /* CH_HAL_USE_CAN */< / span >
< a name = "l00234" > < / a > 00234
< a name = "l00235" > < / a > 00235 < span class = "preprocessor" > #endif < / span > < span class = "comment" > /* _CAN_LLD_H_ */< / span >
< a name = "l00236" > < / a > 00236 < span class = "comment" > < / span >
< a name = "l00237" > < / a > 00237 < span class = "comment" > /** @} */< / span >
< / pre > < / div > < / div >
2010-11-22 05:53:37 +00:00
< / div >
2010-08-10 03:11:02 +00:00
< hr size = "1" > < address style = "text-align: right;" > < small >
2010-11-30 04:54:43 +00:00
Generated on Sun Nov 28 2010 14:09:48 for ChibiOS/RT by < a href = "http://www.doxygen.org/index.html" > < img src = "doxygen.png" alt = "doxygen" align = "middle" border = "0" > < / a > 1.7.1< / small > < / address >
2010-08-10 03:11:02 +00:00
< / body >
< / html >