ppp_hdlc.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #ifndef DEV_PPP_HDLC_H_
  2. #define DEV_PPP_HDLC_H_
  3. /*
  4. * Copyright (C) 2012 by egnite GmbH
  5. *
  6. * All rights reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions
  10. * are met:
  11. *
  12. * 1. Redistributions of source code must retain the above copyright
  13. * notice, this list of conditions and the following disclaimer.
  14. * 2. Redistributions in binary form must reproduce the above copyright
  15. * notice, this list of conditions and the following disclaimer in the
  16. * documentation and/or other materials provided with the distribution.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  19. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  20. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  21. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  22. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  23. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  24. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  25. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  26. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  27. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  28. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  29. * SUCH DAMAGE.
  30. *
  31. * For additional information see http://www.ethernut.de/
  32. */
  33. #include <sys/device.h>
  34. /*!
  35. * \defgroup xgPppHdlc PPP AHDLC driver
  36. * \ingroup xgDevSerial
  37. * \brief Generic PPP AHDLC UART driver.
  38. *
  39. * This new driver and all related drivers had been partly tested
  40. * by running PPP on the Ethernut 3.1D reference board, using a new
  41. * \ref xrUsartCb "driver frame". No other tests had been done. This
  42. * early code is incomplete and probably buggy.
  43. *
  44. * The original AHDLC driver had been implemented as a full UART driver
  45. * to provide maximum performance for the 8 bit AVR family. Unfortunately,
  46. * later implementations for newly supported 32 bit targets had been done
  47. * in the same way. Over the time several drivers were created, which do
  48. * not only duplicate the code of the original driver, but also duplicate
  49. * code of the non-HDLC UART drivers. Consequently, as HDLC is not often
  50. * used, these drivers rarely catch up with the latest changes in the
  51. * generic UART drivers.
  52. *
  53. * While compatible with previous AHDLC drivers in general, this new
  54. * implementation is done in a different way. Instead of implementing a
  55. * full UART device driver, it attaches itself to an existing driver,
  56. * adding HDLC capability to this driver. Applications, who want to use
  57. * this new driver, needs to be slightly modified: They must register
  58. * a standard UART driver before registering the HDLC driver. In addition,
  59. * this driver's name differs from the UART driver ("luartx" instead of
  60. * "uartx"), which will require a change in the PPP open call.
  61. */
  62. /*@{*/
  63. /*!
  64. * \brief PPP HDLC device attached to "uart0".
  65. */
  66. extern NUTDEVICE devPppHdlc0;
  67. /*!
  68. * \brief PPP HDLC device attached to "uart1".
  69. */
  70. extern NUTDEVICE devPppHdlc1;
  71. /*@}*/
  72. #endif