am_hal_systick.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. //*****************************************************************************
  2. //
  3. // am_hal_systick.h
  4. //! @file
  5. //!
  6. //! @brief Functions for accessing and configuring the SYSTICK.
  7. //!
  8. //! @addtogroup systick2 System Timer (SYSTICK)
  9. //! @ingroup apollo2hal
  10. //! @{
  11. //
  12. //*****************************************************************************
  13. //*****************************************************************************
  14. //
  15. // Copyright (c) 2017, Ambiq Micro
  16. // All rights reserved.
  17. //
  18. // Redistribution and use in source and binary forms, with or without
  19. // modification, are permitted provided that the following conditions are met:
  20. //
  21. // 1. Redistributions of source code must retain the above copyright notice,
  22. // this list of conditions and the following disclaimer.
  23. //
  24. // 2. Redistributions in binary form must reproduce the above copyright
  25. // notice, this list of conditions and the following disclaimer in the
  26. // documentation and/or other materials provided with the distribution.
  27. //
  28. // 3. Neither the name of the copyright holder nor the names of its
  29. // contributors may be used to endorse or promote products derived from this
  30. // software without specific prior written permission.
  31. //
  32. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  33. // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  34. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  35. // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
  36. // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  37. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  38. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  39. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  40. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  41. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  42. // POSSIBILITY OF SUCH DAMAGE.
  43. //
  44. // This is part of revision 1.2.11 of the AmbiqSuite Development Package.
  45. //
  46. //*****************************************************************************
  47. #ifndef AM_HAL_SYSTICK_H
  48. #define AM_HAL_SYSTICK_H
  49. #ifdef __cplusplus
  50. extern "C"
  51. {
  52. #endif
  53. //*****************************************************************************
  54. //
  55. // External function definitions
  56. //
  57. //*****************************************************************************
  58. extern void am_hal_systick_start(void);
  59. extern void am_hal_systick_stop(void);
  60. extern void am_hal_systick_int_enable(void);
  61. extern void am_hal_systick_int_disable(void);
  62. extern uint32_t am_hal_systick_int_status_get(void);
  63. extern void am_hal_systick_reset(void);
  64. extern void am_hal_systick_load(uint32_t ui32LoadVal);
  65. extern uint32_t am_hal_systick_count(void);
  66. extern uint32_t am_hal_systick_wait_ticks(uint32_t u32Ticks);
  67. extern uint32_t am_hal_systick_delay_us(uint32_t u32NumUs);
  68. #ifdef __cplusplus
  69. }
  70. #endif
  71. #endif // AM_HAL_SYSTICK_H
  72. //*****************************************************************************
  73. //
  74. // End Doxygen group.
  75. //! @}
  76. //
  77. //*****************************************************************************