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_systick.h 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /**********************************************************************
  2. * $Id$ lpc17xx_systick.h 2010-05-21
  3. *//**
  4. * @file lpc17xx_systick.h
  5. * @brief Contains all macro definitions and function prototypes
  6. * support for SYSTICK 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 SYSTICK SYSTICK (System Tick)
  34. * @ingroup LPC1700CMSIS_FwLib_Drivers
  35. * @{
  36. */
  37. #ifndef LPC17XX_SYSTICK_H_
  38. #define LPC17XX_SYSTICK_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 SYSTICK_Private_Macros SYSTICK Private Macros
  48. * @{
  49. */
  50. /*********************************************************************//**
  51. * Macro defines for System Timer Control and status (STCTRL) register
  52. **********************************************************************/
  53. #define ST_CTRL_ENABLE ((uint32_t)(1<<0))
  54. #define ST_CTRL_TICKINT ((uint32_t)(1<<1))
  55. #define ST_CTRL_CLKSOURCE ((uint32_t)(1<<2))
  56. #define ST_CTRL_COUNTFLAG ((uint32_t)(1<<16))
  57. /*********************************************************************//**
  58. * Macro defines for System Timer Reload value (STRELOAD) register
  59. **********************************************************************/
  60. #define ST_RELOAD_RELOAD(n) ((uint32_t)(n & 0x00FFFFFF))
  61. /*********************************************************************//**
  62. * Macro defines for System Timer Current value (STCURRENT) register
  63. **********************************************************************/
  64. #define ST_RELOAD_CURRENT(n) ((uint32_t)(n & 0x00FFFFFF))
  65. /*********************************************************************//**
  66. * Macro defines for System Timer Calibration value (STCALIB) register
  67. **********************************************************************/
  68. #define ST_CALIB_TENMS(n) ((uint32_t)(n & 0x00FFFFFF))
  69. #define ST_CALIB_SKEW ((uint32_t)(1<<30))
  70. #define ST_CALIB_NOREF ((uint32_t)(1<<31))
  71. #define CLKSOURCE_EXT ((uint32_t)(0))
  72. #define CLKSOURCE_CPU ((uint32_t)(1))
  73. /**
  74. * @}
  75. */
  76. /* Public Functions ----------------------------------------------------------- */
  77. /** @defgroup SYSTICK_Public_Functions SYSTICK Public Functions
  78. * @{
  79. */
  80. void SYSTICK_InternalInit(uint32_t time);
  81. void SYSTICK_ExternalInit(uint32_t freq, uint32_t time);
  82. void SYSTICK_Cmd(FunctionalState NewState);
  83. void SYSTICK_IntCmd(FunctionalState NewState);
  84. uint32_t SYSTICK_GetCurrentValue(void);
  85. void SYSTICK_ClearCounterFlag(void);
  86. /**
  87. * @}
  88. */
  89. #ifdef __cplusplus
  90. }
  91. #endif
  92. #endif /* LPC17XX_SYSTICK_H_ */
  93. /**
  94. * @}
  95. */
  96. /* --------------------------------- End Of File ------------------------------ */