watchdog.h 3.3 KB

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