hal_sleep.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /**************************************************************************************************
  2. Filename: hal_sleep.h
  3. Revised: $Date: 2012-03-02 15:52:01 -0800 (Fri, 02 Mar 2012) $
  4. Revision: $Revision: 29608 $
  5. Description: This file contains the interface to the power management service.
  6. Copyright 2006-2012 Texas Instruments Incorporated. All rights reserved.
  7. IMPORTANT: Your use of this Software is limited to those specific rights
  8. granted under the terms of a software license agreement between the user
  9. who downloaded the software, his/her employer (which must be your employer)
  10. and Texas Instruments Incorporated (the "License"). You may not use this
  11. Software unless you agree to abide by the terms of the License. The License
  12. limits your use, and you acknowledge, that the Software may not be modified,
  13. copied or distributed unless embedded on a Texas Instruments microcontroller
  14. or used solely and exclusively in conjunction with a Texas Instruments radio
  15. frequency transceiver, which is integrated into your product. Other than for
  16. the foregoing purpose, you may not use, reproduce, copy, prepare derivative
  17. works of, modify, distribute, perform, display or sell this Software and/or
  18. its documentation for any purpose.
  19. YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
  20. PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
  21. INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
  22. NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
  23. TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
  24. NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
  25. LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
  26. INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
  27. OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
  28. OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
  29. (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
  30. Should you have any questions regarding your right to use this Software,
  31. contact Texas Instruments Incorporated at www.TI.com.
  32. **************************************************************************************************/
  33. #ifndef HAL_SLEEP_H
  34. #define HAL_SLEEP_H
  35. #ifdef __cplusplus
  36. extern "C"
  37. {
  38. #endif
  39. /*********************************************************************
  40. * FUNCTIONS
  41. */
  42. /*
  43. * Execute power management procedure
  44. */
  45. extern void halSleep( uint16 osal_timer );
  46. /*
  47. * Used in mac_mcu
  48. */
  49. extern void halSleepWait(uint16 duration);
  50. /*
  51. * Used in hal_drivers, AN044 - DELAY EXTERNAL INTERRUPTS
  52. */
  53. extern void halRestoreSleepLevel( void );
  54. /*
  55. * Used by the interrupt routines to exit from sleep.
  56. */
  57. extern void halSleepExit(void);
  58. /*
  59. * Set the max sleep loop time lesser than the T2 rollover period.
  60. */
  61. extern void halSetMaxSleepLoopTime(uint32 rolloverTime);
  62. /*********************************************************************
  63. *********************************************************************/
  64. #ifdef __cplusplus
  65. }
  66. #endif
  67. #endif