Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SPI.h 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. LUFA Library
  3. Copyright (C) Dean Camera, 2014.
  4. dean [at] fourwalledcubicle [dot] com
  5. www.lufa-lib.org
  6. */
  7. /*
  8. Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com)
  9. Permission to use, copy, modify, distribute, and sell this
  10. software and its documentation for any purpose is hereby granted
  11. without fee, provided that the above copyright notice appear in
  12. all copies and that both that the copyright notice and this
  13. permission notice and warranty disclaimer appear in supporting
  14. documentation, and that the name of the author not be used in
  15. advertising or publicity pertaining to distribution of the
  16. software without specific, written prior permission.
  17. The author disclaims all warranties with regard to this
  18. software, including all implied warranties of merchantability
  19. and fitness. In no event shall the author be liable for any
  20. special, indirect or consequential damages or any damages
  21. whatsoever resulting from loss of use, data or profits, whether
  22. in an action of contract, negligence or other tortious action,
  23. arising out of or in connection with the use or performance of
  24. this software.
  25. */
  26. /** \file
  27. * \brief Hardware Serial Peripheral Interface driver.
  28. *
  29. * This file is the master dispatch header file for the device-specific SPI driver, for microcontrollers
  30. * containing a hardware SPI.
  31. *
  32. * User code should include this file, which will in turn include the correct SPI driver header file for the
  33. * currently selected architecture and microcontroller model.
  34. */
  35. /** \ingroup Group_PeripheralDrivers
  36. * \defgroup Group_SPI SPI Driver - LUFA/Drivers/Peripheral/SPI.h
  37. * \brief Hardware Serial Peripheral Interface driver.
  38. *
  39. * \section Sec_SPI_Dependencies Module Source Dependencies
  40. * The following files must be built with any user project that uses this module:
  41. * - None
  42. *
  43. * \section Sec_SPI_ModDescription Module Description
  44. * Hardware SPI driver. This module provides an easy to use driver for the setup and transfer of data over
  45. * the selected architecture and microcontroller model's SPI port.
  46. *
  47. * \note The exact API for this driver may vary depending on the target used - see
  48. * individual target module documentation for the API specific to your target processor.
  49. */
  50. #ifndef __SPI_H__
  51. #define __SPI_H__
  52. /* Macros: */
  53. #define __INCLUDE_FROM_SPI_H
  54. /* Includes: */
  55. #include "../../Common/Common.h"
  56. /* Includes: */
  57. #if (ARCH == ARCH_AVR8)
  58. #include "AVR8/SPI_AVR8.h"
  59. #elif (ARCH == ARCH_XMEGA)
  60. #include "XMEGA/SPI_XMEGA.h"
  61. #else
  62. #error The SPI peripheral driver is not currently available for your selected architecture.
  63. #endif
  64. #endif