My Marlin configs for Fabrikator Mini and CTC i3 Pro B
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. /**********************************************************************
  2. * $Id$ lpc17xx_exti.h 2010-05-21
  3. *//**
  4. * @file lpc17xx_exti.h
  5. * @brief Contains all macro definitions and function prototypes
  6. * support for External interrupt firmware library on LPC17xx
  7. * @version 2.0
  8. * @date 21. May. 2010
  9. * @author NXP MCU SW Application Team
  10. *
  11. * Copyright(C) 2010, NXP Semiconductor
  12. * All rights reserved.
  13. *
  14. ***********************************************************************
  15. * Software that is described herein is for illustrative purposes only
  16. * which provides customers with programming information regarding the
  17. * products. This software is supplied "AS IS" without any warranties.
  18. * NXP Semiconductors assumes no responsibility or liability for the
  19. * use of the software, conveys no license or title under any patent,
  20. * copyright, or mask work right to the product. NXP Semiconductors
  21. * reserves the right to make changes in the software without
  22. * notification. NXP Semiconductors also make no representation or
  23. * warranty that such application will be suitable for the specified
  24. * use without further testing or modification.
  25. * Permission to use, copy, modify, and distribute this software and its
  26. * documentation is hereby granted, under NXP Semiconductors'
  27. * relevant copyright in the software, without fee, provided that it
  28. * is used in conjunction with NXP Semiconductors microcontrollers. This
  29. * copyright, permission, and disclaimer notice must appear in all copies of
  30. * this code.
  31. **********************************************************************/
  32. /* Peripheral group ----------------------------------------------------------- */
  33. /** @defgroup EXTI EXTI (External Interrupt)
  34. * @ingroup LPC1700CMSIS_FwLib_Drivers
  35. * @{
  36. */
  37. #ifndef LPC17XX_EXTI_H_
  38. #define LPC17XX_EXTI_H_
  39. /* Includes ------------------------------------------------------------------- */
  40. #include "LPC17xx.h"
  41. #include "lpc_types.h"
  42. #ifdef __cplusplus
  43. extern "C"
  44. {
  45. #endif
  46. /* Private Macros ------------------------------------------------------------- */
  47. /** @defgroup EXTI_Private_Macros EXTI Private Macros
  48. * @{
  49. */
  50. /*********************************************************************//**
  51. * Macro defines for EXTI control register
  52. **********************************************************************/
  53. #define EXTI_EINT0_BIT_MARK 0x01
  54. #define EXTI_EINT1_BIT_MARK 0x02
  55. #define EXTI_EINT2_BIT_MARK 0x04
  56. #define EXTI_EINT3_BIT_MARK 0x08
  57. /**
  58. * @}
  59. */
  60. /* Private Macros ------------------------------------------------------------- */
  61. /** @defgroup EXTI_Public_Types EXTI Public Types
  62. * @{
  63. */
  64. /**
  65. * @brief EXTI external interrupt line option
  66. */
  67. typedef enum
  68. {
  69. EXTI_EINT0, /*!< External interrupt 0, P2.10 */
  70. EXTI_EINT1, /*!< External interrupt 0, P2.11 */
  71. EXTI_EINT2, /*!< External interrupt 0, P2.12 */
  72. EXTI_EINT3 /*!< External interrupt 0, P2.13 */
  73. } EXTI_LINE_ENUM;
  74. /**
  75. * @brief EXTI mode option
  76. */
  77. typedef enum
  78. {
  79. EXTI_MODE_LEVEL_SENSITIVE, /*!< Level sensitivity is selected */
  80. EXTI_MODE_EDGE_SENSITIVE /*!< Edge sensitivity is selected */
  81. } EXTI_MODE_ENUM;
  82. /**
  83. * @brief EXTI polarity option
  84. */
  85. typedef enum
  86. {
  87. EXTI_POLARITY_LOW_ACTIVE_OR_FALLING_EDGE, /*!< Low active or falling edge sensitive
  88. depending on pin mode */
  89. EXTI_POLARITY_HIGH_ACTIVE_OR_RISING_EDGE /*!< High active or rising edge sensitive
  90. depending on pin mode */
  91. } EXTI_POLARITY_ENUM;
  92. /**
  93. * @brief EXTI Initialize structure
  94. */
  95. typedef struct
  96. {
  97. EXTI_LINE_ENUM EXTI_Line; /*!<Select external interrupt pin (EINT0, EINT1, EINT 2, EINT3) */
  98. EXTI_MODE_ENUM EXTI_Mode; /*!< Choose between Level-sensitivity or Edge sensitivity */
  99. EXTI_POLARITY_ENUM EXTI_polarity; /*!< If EXTI mode is level-sensitive: this element use to select low or high active level
  100. if EXTI mode is polarity-sensitive: this element use to select falling or rising edge */
  101. }EXTI_InitTypeDef;
  102. /**
  103. * @}
  104. */
  105. /* Public Functions ----------------------------------------------------------- */
  106. /** @defgroup EXTI_Public_Functions EXTI Public Functions
  107. * @{
  108. */
  109. void EXTI_Init(void);
  110. void EXTI_DeInit(void);
  111. void EXTI_Config(EXTI_InitTypeDef *EXTICfg);
  112. void EXTI_SetMode(EXTI_LINE_ENUM EXTILine, EXTI_MODE_ENUM mode);
  113. void EXTI_SetPolarity(EXTI_LINE_ENUM EXTILine, EXTI_POLARITY_ENUM polarity);
  114. void EXTI_ClearEXTIFlag(EXTI_LINE_ENUM EXTILine);
  115. /**
  116. * @}
  117. */
  118. #ifdef __cplusplus
  119. }
  120. #endif
  121. #endif /* LPC17XX_EXTI_H_ */
  122. /**
  123. * @}
  124. */
  125. /* --------------------------------- End Of File ------------------------------ */