2009-11-29 08:50:13 +00:00
|
|
|
/*
|
2013-03-30 10:32:37 +00:00
|
|
|
ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
|
2009-11-29 08:50:13 +00:00
|
|
|
|
2013-03-30 10:32:37 +00:00
|
|
|
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
|
2009-11-29 08:50:13 +00:00
|
|
|
|
2013-03-30 10:32:37 +00:00
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
2009-11-29 08:50:13 +00:00
|
|
|
|
2013-03-30 10:32:37 +00: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.
|
2009-11-29 08:50:13 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2010-02-06 16:17:30 +00:00
|
|
|
* @file xxx.h
|
|
|
|
* @brief XXX Driver macros and structures.
|
|
|
|
*
|
2009-11-29 08:50:13 +00:00
|
|
|
* @addtogroup XXX
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _XXX_H_
|
|
|
|
#define _XXX_H_
|
|
|
|
|
2010-11-01 17:29:56 +00:00
|
|
|
#if HAL_USE_XXX || defined(__DOXYGEN__)
|
2009-12-08 15:33:39 +00:00
|
|
|
|
2009-12-29 11:12:05 +00:00
|
|
|
/*===========================================================================*/
|
|
|
|
/* Driver constants. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
|
|
|
/*===========================================================================*/
|
|
|
|
/* Driver pre-compile time settings. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
|
|
|
/*===========================================================================*/
|
|
|
|
/* Derived constants and error checks. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
|
|
|
/*===========================================================================*/
|
|
|
|
/* Driver data structures and types. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
2009-11-29 08:50:13 +00:00
|
|
|
/**
|
2010-02-06 16:17:30 +00:00
|
|
|
* @brief Driver state machine possible states.
|
2009-11-29 08:50:13 +00:00
|
|
|
*/
|
|
|
|
typedef enum {
|
2010-10-31 13:06:42 +00:00
|
|
|
XXX_UNINIT = 0, /**< Not initialized. */
|
|
|
|
XXX_STOP = 1, /**< Stopped. */
|
|
|
|
XXX_READY = 2, /**< Ready. */
|
2009-11-29 08:50:13 +00:00
|
|
|
} xxxstate_t;
|
|
|
|
|
2011-09-03 08:23:11 +00:00
|
|
|
/**
|
|
|
|
* @brief Type of a structure representing a XXX driver.
|
|
|
|
*/
|
|
|
|
typedef struct XXXDriver XXXDriver;
|
|
|
|
|
2009-11-29 08:50:13 +00:00
|
|
|
#include "xxx_lld.h"
|
|
|
|
|
2009-12-29 11:12:05 +00:00
|
|
|
/*===========================================================================*/
|
|
|
|
/* Driver macros. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
|
|
|
/*===========================================================================*/
|
|
|
|
/* External declarations. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
2009-11-29 08:50:13 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
void xxxInit(void);
|
|
|
|
void xxxObjectInit(XXXDriver *xxxp);
|
|
|
|
void xxxStart(XXXDriver *xxxp, const XXXConfig *config);
|
|
|
|
void xxxStop(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_H_ */
|
|
|
|
|
|
|
|
/** @} */
|