aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/templates/can_lld.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-09 08:24:22 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-09 08:24:22 +0000
commit8ca210a4af9fd039e290cfcc309adde543999c1f (patch)
tree1aa594d5e65d5ebabdd358acbe8d3a9ac29f2070 /os/hal/templates/can_lld.c
parentcb453a3a12464dd71856b1354d083b5b02260870 (diff)
downloadChibiOS-8ca210a4af9fd039e290cfcc309adde543999c1f.tar.gz
ChibiOS-8ca210a4af9fd039e290cfcc309adde543999c1f.tar.bz2
ChibiOS-8ca210a4af9fd039e290cfcc309adde543999c1f.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6108 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/templates/can_lld.c')
-rw-r--r--os/hal/templates/can_lld.c243
1 files changed, 0 insertions, 243 deletions
diff --git a/os/hal/templates/can_lld.c b/os/hal/templates/can_lld.c
deleted file mode 100644
index d095a645e..000000000
--- a/os/hal/templates/can_lld.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
-
- Licensed 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
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- 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.
-*/
-
-/**
- * @file templates/can_lld.c
- * @brief CAN Driver subsystem low level driver source template.
- *
- * @addtogroup CAN
- * @{
- */
-
-#include "ch.h"
-#include "hal.h"
-
-#if HAL_USE_CAN || defined(__DOXYGEN__)
-
-/*===========================================================================*/
-/* Driver local definitions. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Driver exported variables. */
-/*===========================================================================*/
-
-/**
- * @brief CAN1 driver identifier.
- */
-#if PLATFORM_CAN_USE_CAN1 || defined(__DOXYGEN__)
-CANDriver CAND1;
-#endif
-
-/*===========================================================================*/
-/* Driver local variables and types. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Driver local functions. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Driver interrupt handlers. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Driver exported functions. */
-/*===========================================================================*/
-
-/**
- * @brief Low level CAN driver initialization.
- *
- * @notapi
- */
-void can_lld_init(void) {
-
-#if PLATFORM_CAN_USE_CAN1
- /* Driver initialization.*/
- canObjectInit(&CAND1);
-#endif /* PLATFORM_CAN_USE_CAN1 */
-}
-
-/**
- * @brief Configures and activates the CAN peripheral.
- *
- * @param[in] canp pointer to the @p CANDriver object
- *
- * @notapi
- */
-void can_lld_start(CANDriver *canp) {
-
- if (canp->state == CAN_STOP) {
- /* Enables the peripheral.*/
-#if PLATFORM_CAN_USE_CAN1
- if (&CAND1 == canp) {
-
- }
-#endif /* PLATFORM_CAN_USE_CAN1 */
- }
- /* Configures the peripheral.*/
-
-}
-
-/**
- * @brief Deactivates the CAN peripheral.
- *
- * @param[in] canp pointer to the @p CANDriver object
- *
- * @notapi
- */
-void can_lld_stop(CANDriver *canp) {
-
- if (canp->state == CAN_READY) {
- /* Resets the peripheral.*/
-
- /* Disables the peripheral.*/
-#if PLATFORM_CAN_USE_CAN1
- if (&CAND1 == canp) {
-
- }
-#endif /* PLATFORM_CAN_USE_CAN1 */
- }
-}
-
-/**
- * @brief Determines whether a frame can be transmitted.
- *
- * @param[in] canp pointer to the @p CANDriver object
- * @param[in] mailbox mailbox number, @p CAN_ANY_MAILBOX for any mailbox
- *
- * @return The queue space availability.
- * @retval FALSE no space in the transmit queue.
- * @retval TRUE transmit slot available.
- *
- * @notapi
- */
-bool_t can_lld_is_tx_empty(CANDriver *canp, canmbx_t mailbox) {
-
- (void)canp;
-
- switch (mailbox) {
- case CAN_ANY_MAILBOX:
- return FALSE;
- case 1:
- return FALSE;
- case 2:
- return FALSE;
- case 3:
- return FALSE;
- default:
- return FALSE;
- }
-}
-
-/**
- * @brief Inserts a frame into the transmit queue.
- *
- * @param[in] canp pointer to the @p CANDriver object
- * @param[in] ctfp pointer to the CAN frame to be transmitted
- * @param[in] mailbox mailbox number, @p CAN_ANY_MAILBOX for any mailbox
- *
- * @notapi
- */
-void can_lld_transmit(CANDriver *canp,
- canmbx_t mailbox,
- const CANTxFrame *ctfp) {
-
- (void)canp;
- (void)mailbox;
- (void)ctfp;
-
-}
-
-/**
- * @brief Determines whether a frame has been received.
- *
- * @param[in] canp pointer to the @p CANDriver object
- * @param[in] mailbox mailbox number, @p CAN_ANY_MAILBOX for any mailbox
- *
- * @return The queue space availability.
- * @retval FALSE no space in the transmit queue.
- * @retval TRUE transmit slot available.
- *
- * @notapi
- */
-bool_t can_lld_is_rx_nonempty(CANDriver *canp, canmbx_t mailbox) {
-
- (void)canp;
- (void)mailbox;
-
- switch (mailbox) {
- case CAN_ANY_MAILBOX:
- return FALSE;
- case 1:
- return FALSE;
- case 2:
- return FALSE;
- default:
- return FALSE;
- }
-}
-
-/**
- * @brief Receives a frame from the input queue.
- *
- * @param[in] canp pointer to the @p CANDriver object
- * @param[in] mailbox mailbox number, @p CAN_ANY_MAILBOX for any mailbox
- * @param[out] crfp pointer to the buffer where the CAN frame is copied
- *
- * @notapi
- */
-void can_lld_receive(CANDriver *canp,
- canmbx_t mailbox,
- CANRxFrame *crfp) {
-
- (void)canp;
- (void)mailbox;
- (void)crfp;
-
-}
-
-#if CAN_USE_SLEEP_MODE || defined(__DOXYGEN__)
-/**
- * @brief Enters the sleep mode.
- *
- * @param[in] canp pointer to the @p CANDriver object
- *
- * @notapi
- */
-void can_lld_sleep(CANDriver *canp) {
-
- (void)canp;
-
-}
-
-/**
- * @brief Enforces leaving the sleep mode.
- *
- * @param[in] canp pointer to the @p CANDriver object
- *
- * @notapi
- */
-void can_lld_wakeup(CANDriver *canp) {
-
- (void)canp;
-
-}
-#endif /* CAN_USE_SLEEP_MODE */
-
-#endif /* HAL_USE_CAN */
-
-/** @} */