Naze32 clone with Frysky receiver
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

sleep_api.h 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* mbed Microcontroller Library
  2. * Copyright (c) 2006-2013 ARM Limited
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef MBED_SLEEP_API_H
  17. #define MBED_SLEEP_API_H
  18. #include "device.h"
  19. #if DEVICE_SLEEP
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. /** Send the microcontroller to sleep
  24. *
  25. * The processor is setup ready for sleep, and sent to sleep using __WFI(). In this mode, the
  26. * system clock to the core is stopped until a reset or an interrupt occurs. This eliminates
  27. * dynamic power used by the processor, memory systems and buses. The processor, peripheral and
  28. * memory state are maintained, and the peripherals continue to work and can generate interrupts.
  29. *
  30. * The processor can be woken up by any internal peripheral interrupt or external pin interrupt.
  31. *
  32. * @note
  33. * The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored.
  34. * Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be
  35. * able to access the LocalFileSystem
  36. */
  37. void sleep(void);
  38. /** Send the microcontroller to deep sleep
  39. *
  40. * This processor is setup ready for deep sleep, and sent to sleep using __WFI(). This mode
  41. * has the same sleep features as sleep plus it powers down peripherals and clocks. All state
  42. * is still maintained.
  43. *
  44. * The processor can only be woken up by an external interrupt on a pin or a watchdog timer.
  45. *
  46. * @note
  47. * The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored.
  48. * Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be
  49. * able to access the LocalFileSystem
  50. */
  51. void deepsleep(void);
  52. #ifdef __cplusplus
  53. }
  54. #endif
  55. #endif
  56. #endif