diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-10-23 15:03:07 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-10-23 15:03:07 +0000 |
commit | 61258cb40b8d723254771780a7ffc08245fb37ae (patch) | |
tree | 4b8119e86f56ea0487a6cdb963b55e589ab87ebf /os/io/spi.h | |
parent | 8c10c8f576a67087a22b249bef43681227369a80 (diff) | |
download | ChibiOS-61258cb40b8d723254771780a7ffc08245fb37ae.tar.gz ChibiOS-61258cb40b8d723254771780a7ffc08245fb37ae.tar.bz2 ChibiOS-61258cb40b8d723254771780a7ffc08245fb37ae.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1248 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/io/spi.h')
-rw-r--r-- | os/io/spi.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/os/io/spi.h b/os/io/spi.h new file mode 100644 index 000000000..bb4244944 --- /dev/null +++ b/os/io/spi.h @@ -0,0 +1,51 @@ +/*
+ ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
+
+ 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/>.
+*/
+
+/**
+ * @file spi.h
+ * @brief SPI Driver macros and structures.
+ * @addtogroup SPI
+ * @{
+ */
+
+#ifndef _SPI_H_
+#define _SPI_H_
+
+#include "spi_lld.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void spiInit(void);
+ void spiObjectInit(SPIDriver *spip);
+ void spiSetup(SPIDriver *spip, const SPIConfig *config);
+ void spiSelect(SPIDriver *spip);
+ void spiUnselect(SPIDriver *spip);
+ void spiExchange(SPIDriver *spip, size_t n, void *rxbuf, void *txbuf);
+#if SPI_USE_MUTUAL_EXCLUSION
+ void spiAcquireBus(SPIDriver *spip);
+ void spiReleaseBus(SPIDriver *spip);
+#endif /* SPI_USE_MUTUAL_EXCLUSION */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SPI_H_ */
+
+/** @} */
|