owibus_bbif.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #ifndef _OWI_BB_H_
  2. #define _OWI_BB_H_
  3. /*
  4. * Copyright (C) 2012 by Uwe Bonnes(bon@elektron.ikp.physik.tu-darmstadt.de)
  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. * 3. Neither the name of the copyright holders nor the names of
  18. * contributors may be used to endorse or promote products derived
  19. * from this software without specific prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  24. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  25. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  26. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  27. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  28. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  29. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  30. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  31. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  32. * SUCH DAMAGE.
  33. *
  34. * For additional information see http://www.ethernut.de/
  35. */
  36. /*!
  37. * \file dev/owibus_uartif.c
  38. * \brief Header for the One-Wire API bitbang Implementation
  39. *
  40. * \verbatim
  41. * $Id: owibus_bbif.h 4424 2012-08-17 12:12:06Z haraldkipp $
  42. * \endverbatim
  43. */
  44. /*!
  45. * \brief Array of delay values for the different command phases.
  46. */
  47. #include <stdint.h>
  48. #include <sys/types.h>
  49. /*!
  50. * \addtogroup xgOwibusBb
  51. */
  52. /*@{*/
  53. extern const uint16_t owi_timervalues_250ns[OWI_MODE_NONE][OWI_CMD_NONE][OWI_PHASE_NONE];
  54. /*!
  55. * \brief OWI runtime controlblock container.
  56. *
  57. * This is installed in heap at initialization.
  58. */
  59. struct _NUTOWIINFO_BB {
  60. int txrx_port;
  61. int txrx_pin;
  62. int pp_port;
  63. int pp_pin;
  64. };
  65. typedef struct _NUTOWIINFO_BB NUTOWIINFO_BB;
  66. int NutRegisterOwiBus_BB(NUTOWIBUS *bus, int tx_port, uint_fast8_t tx_pin, int pullup_port, uint_fast8_t pullup_pin);
  67. /*@}*/
  68. #endif