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.

lpc17xx_rit.h 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /**********************************************************************
  2. * $Id$ lpc17xx_rit.h 2010-05-21
  3. *//**
  4. * @file lpc17xx_rit.h
  5. * @brief Contains all macro definitions and function prototypes
  6. * support for RIT 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 RIT RIT (Repetitive Interrupt Timer)
  34. * @ingroup LPC1700CMSIS_FwLib_Drivers
  35. * @{
  36. */
  37. #ifndef LPC17XX_RIT_H_
  38. #define LPC17XX_RIT_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 RIT_Private_Macros RIT Private Macros
  48. * @{
  49. */
  50. /* --------------------- BIT DEFINITIONS -------------------------------------- */
  51. /*********************************************************************//**
  52. * Macro defines for RIT control register
  53. **********************************************************************/
  54. /** Set interrupt flag when the counter value equals the masked compare value */
  55. #define RIT_CTRL_INTEN ((uint32_t) (1))
  56. /** Set timer enable clear to 0 when the counter value equals the masked compare value */
  57. #define RIT_CTRL_ENCLR ((uint32_t) _BIT(1))
  58. /** Set timer enable on debug */
  59. #define RIT_CTRL_ENBR ((uint32_t) _BIT(2))
  60. /** Set timer enable */
  61. #define RIT_CTRL_TEN ((uint32_t) _BIT(3))
  62. /** Macro to determine if it is valid RIT peripheral */
  63. #define PARAM_RITx(n) (((uint32_t *)n)==((uint32_t *)LPC_RIT))
  64. /**
  65. * @}
  66. */
  67. /* Public Functions ----------------------------------------------------------- */
  68. /** @defgroup RIT_Public_Functions RIT Public Functions
  69. * @{
  70. */
  71. /* RIT Init/DeInit functions */
  72. void RIT_Init(LPC_RIT_TypeDef *RITx);
  73. void RIT_DeInit(LPC_RIT_TypeDef *RITx);
  74. /* RIT config timer functions */
  75. void RIT_TimerConfig(LPC_RIT_TypeDef *RITx, uint32_t time_interval);
  76. /* Enable/Disable RIT functions */
  77. void RIT_TimerClearCmd(LPC_RIT_TypeDef *RITx, FunctionalState NewState);
  78. void RIT_Cmd(LPC_RIT_TypeDef *RITx, FunctionalState NewState);
  79. void RIT_TimerDebugCmd(LPC_RIT_TypeDef *RITx, FunctionalState NewState);
  80. /* RIT Interrupt functions */
  81. IntStatus RIT_GetIntStatus(LPC_RIT_TypeDef *RITx);
  82. /**
  83. * @}
  84. */
  85. #ifdef __cplusplus
  86. }
  87. #endif
  88. #endif /* LPC17XX_RIT_H_ */
  89. /**
  90. * @}
  91. */
  92. /* --------------------------------- End Of File ------------------------------ */