watchdog.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. //*****************************************************************************
  2. //
  3. // watchdog.h - Prototypes for the Watchdog Timer API
  4. //
  5. // Copyright (c) 2005-2009 Luminary Micro, Inc. All rights reserved.
  6. // Software License Agreement
  7. //
  8. // Luminary Micro, Inc. (LMI) is supplying this software for use solely and
  9. // exclusively on LMI's microcontroller products.
  10. //
  11. // The software is owned by LMI and/or its suppliers, and is protected under
  12. // applicable copyright laws. All rights are reserved. You may not combine
  13. // this software with "viral" open-source software in order to form a larger
  14. // program. Any use in violation of the foregoing restrictions may subject
  15. // the user to criminal sanctions under applicable laws, as well as to civil
  16. // liability for the breach of the terms and conditions of this license.
  17. //
  18. // THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
  19. // OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
  20. // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
  21. // LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
  22. // CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
  23. //
  24. // This is part of revision 4694 of the Stellaris Peripheral Driver Library.
  25. //
  26. //*****************************************************************************
  27. #ifndef __WATCHDOG_H__
  28. #define __WATCHDOG_H__
  29. //*****************************************************************************
  30. //
  31. // If building with a C++ compiler, make all of the definitions in this header
  32. // have a C binding.
  33. //
  34. //*****************************************************************************
  35. #ifdef __cplusplus
  36. extern "C"
  37. {
  38. #endif
  39. //*****************************************************************************
  40. //
  41. // Prototypes for the APIs.
  42. //
  43. //*****************************************************************************
  44. extern tBoolean WatchdogRunning(unsigned long ulBase);
  45. extern void WatchdogEnable(unsigned long ulBase);
  46. extern void WatchdogResetEnable(unsigned long ulBase);
  47. extern void WatchdogResetDisable(unsigned long ulBase);
  48. extern void WatchdogLock(unsigned long ulBase);
  49. extern void WatchdogUnlock(unsigned long ulBase);
  50. extern tBoolean WatchdogLockState(unsigned long ulBase);
  51. extern void WatchdogReloadSet(unsigned long ulBase, unsigned long ulLoadVal);
  52. extern unsigned long WatchdogReloadGet(unsigned long ulBase);
  53. extern unsigned long WatchdogValueGet(unsigned long ulBase);
  54. extern void WatchdogIntRegister(unsigned long ulBase, void(*pfnHandler)(void));
  55. extern void WatchdogIntUnregister(unsigned long ulBase);
  56. extern void WatchdogIntEnable(unsigned long ulBase);
  57. extern unsigned long WatchdogIntStatus(unsigned long ulBase, tBoolean bMasked);
  58. extern void WatchdogIntClear(unsigned long ulBase);
  59. extern void WatchdogStallEnable(unsigned long ulBase);
  60. extern void WatchdogStallDisable(unsigned long ulBase);
  61. //*****************************************************************************
  62. //
  63. // Mark the end of the C bindings section for C++ compilers.
  64. //
  65. //*****************************************************************************
  66. #ifdef __cplusplus
  67. }
  68. #endif
  69. #endif // __WATCHDOG_H__