SerialSPI.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. LUFA Library
  3. Copyright (C) Dean Camera, 2018.
  4. dean [at] fourwalledcubicle [dot] com
  5. www.lufa-lib.org
  6. */
  7. /*
  8. Copyright 2018 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 SPI Master Mode Serial USART driver.
  28. *
  29. * This file is the master dispatch header file for the device-specific SPI Master Mode USART driver, for
  30. * microcontrollers containing a hardware USART capable of operating in a Master SPI mode.
  31. *
  32. * User code should include this file, which will in turn include the correct ADC driver header file for the
  33. * currently selected architecture and microcontroller model.
  34. */
  35. /** \ingroup Group_PeripheralDrivers
  36. * \defgroup Group_SerialSPI Master SPI Mode Serial USART Driver - LUFA/Drivers/Peripheral/SerialSPI.h
  37. * \brief Hardware SPI Master Mode Serial USART driver.
  38. *
  39. * \section Sec_SerialSPI_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_SerialSPI_ModDescription Module Description
  44. * Hardware SPI Master Mode serial USART driver. This module provides an easy to use driver for the setup and transfer
  45. * of data over the selected architecture and microcontroller model's USART port, using a SPI framing format.
  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 __SERIAL_SPI_H__
  51. #define __SERIAL_SPI_H__
  52. /* Macros: */
  53. #define __INCLUDE_FROM_SERIAL_SPI_H
  54. /* Includes: */
  55. #include "../../Common/Common.h"
  56. /* Includes: */
  57. #if (ARCH == ARCH_AVR8)
  58. #include "AVR8/SerialSPI_AVR8.h"
  59. #elif (ARCH == ARCH_XMEGA)
  60. #include "XMEGA/SerialSPI_XMEGA.h"
  61. #else
  62. #error The Serial SPI Master Mode peripheral driver is not currently available for your selected architecture.
  63. #endif
  64. #endif