2009-11-29 08:50:13 +00:00
|
|
|
/*
|
2011-03-18 18:38:08 +00:00
|
|
|
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
|
2013-02-02 10:58:09 +00:00
|
|
|
2011,2012,2013 Giovanni Di Sirio.
|
2009-11-29 08:50:13 +00:00
|
|
|
|
|
|
|
This file is part of ChibiOS/RT.
|
|
|
|
|
|
|
|
ChibiOS/RT is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
ChibiOS/RT is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2010-02-06 16:17:30 +00:00
|
|
|
* @file templates/xxx_lld.h
|
|
|
|
* @brief XXX Driver subsystem low level driver header template.
|
|
|
|
*
|
2010-10-25 18:48:13 +00:00
|
|
|
* @addtogroup XXX
|
2009-11-29 08:50:13 +00:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _XXX_LLD_H_
|
|
|
|
#define _XXX_LLD_H_
|
|
|
|
|
2010-11-01 17:29:56 +00:00
|
|
|
#if HAL_USE_XXX || defined(__DOXYGEN__)
|
2009-12-08 15:33:39 +00:00
|
|
|
|
2009-11-29 08:50:13 +00:00
|
|
|
/*===========================================================================*/
|
2009-12-02 16:24:32 +00:00
|
|
|
/* Driver constants. */
|
2009-11-29 08:50:13 +00:00
|
|
|
/*===========================================================================*/
|
|
|
|
|
|
|
|
/*===========================================================================*/
|
2009-12-02 16:24:32 +00:00
|
|
|
/* Driver pre-compile time settings. */
|
2009-11-29 08:50:13 +00:00
|
|
|
/*===========================================================================*/
|
|
|
|
|
2009-12-19 10:08:08 +00:00
|
|
|
/*===========================================================================*/
|
|
|
|
/* Derived constants and error checks. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
2009-11-29 08:50:13 +00:00
|
|
|
/*===========================================================================*/
|
|
|
|
/* Driver data structures and types. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
2010-10-31 11:18:41 +00:00
|
|
|
/**
|
|
|
|
* @brief Type of a structure representing an XXX driver.
|
|
|
|
*/
|
|
|
|
typedef struct XXXDriver XXXDriver;
|
|
|
|
|
2009-11-29 08:50:13 +00:00
|
|
|
/**
|
2010-02-06 16:17:30 +00:00
|
|
|
* @brief Driver configuration structure.
|
|
|
|
* @note It could be empty on some architectures.
|
2009-11-29 08:50:13 +00:00
|
|
|
*/
|
|
|
|
typedef struct {
|
|
|
|
|
|
|
|
} XXXConfig;
|
|
|
|
|
|
|
|
/**
|
2010-02-06 16:17:30 +00:00
|
|
|
* @brief Structure representing an XXX driver.
|
2009-11-29 08:50:13 +00:00
|
|
|
*/
|
2010-10-31 11:18:41 +00:00
|
|
|
struct XXXDriver {
|
2009-11-29 08:50:13 +00:00
|
|
|
/**
|
|
|
|
* @brief Driver state.
|
|
|
|
*/
|
2011-02-28 18:44:46 +00:00
|
|
|
xxxstate_t state;
|
2009-11-29 08:50:13 +00:00
|
|
|
/**
|
|
|
|
* @brief Current configuration data.
|
|
|
|
*/
|
2011-02-28 18:44:46 +00:00
|
|
|
const XXXConfig *config;
|
2009-11-29 08:50:13 +00:00
|
|
|
/* End of the mandatory fields.*/
|
2010-10-31 11:18:41 +00:00
|
|
|
};
|
2009-11-29 08:50:13 +00:00
|
|
|
|
2009-12-29 11:12:05 +00:00
|
|
|
/*===========================================================================*/
|
|
|
|
/* Driver macros. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
2009-11-29 08:50:13 +00:00
|
|
|
/*===========================================================================*/
|
|
|
|
/* External declarations. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
2013-02-24 10:07:54 +00:00
|
|
|
#if PLATFORM_XXX_USE_XXX1 && !defined(__DOXYGEN__)
|
|
|
|
extern XXXDriver XXXD1;
|
|
|
|
#endif
|
|
|
|
|
2009-11-29 08:50:13 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
void xxx_lld_init(void);
|
|
|
|
void xxx_lld_start(XXXDriver *xxxp);
|
|
|
|
void xxx_lld_stop(XXXDriver *xxxp);
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2010-11-01 17:29:56 +00:00
|
|
|
#endif /* HAL_USE_XXX */
|
2009-12-08 15:33:39 +00:00
|
|
|
|
2009-11-29 08:50:13 +00:00
|
|
|
#endif /* _XXX_LLD_H_ */
|
|
|
|
|
|
|
|
/** @} */
|