Naze32 clone with Frysky receiver
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

lp_ticker_api.h 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /* mbed Microcontroller Library
  2. * Copyright (c) 2015 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_LPTICKER_API_H
  17. #define MBED_LPTICKER_API_H
  18. #include "device.h"
  19. #if DEVICE_LOWPOWERTIMER
  20. #include "ticker_api.h"
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. /**
  25. * \defgroup LpTicker Low Power Ticker Functions
  26. * @{
  27. */
  28. /** Get low power ticker's data
  29. *
  30. * @return The low power ticker data
  31. */
  32. const ticker_data_t* get_lp_ticker_data(void);
  33. /** The wrapper for ticker_irq_handler, to pass lp ticker's data
  34. *
  35. */
  36. void lp_ticker_irq_handler(void);
  37. /* HAL lp ticker */
  38. /** Initialize the low power ticker
  39. *
  40. */
  41. void lp_ticker_init(void);
  42. /** Read the current counter
  43. *
  44. * @return The current timer's counter value in microseconds
  45. */
  46. uint32_t lp_ticker_read(void);
  47. /** Set interrupt for specified timestamp
  48. *
  49. * @param timestamp The time in microseconds to be set
  50. */
  51. void lp_ticker_set_interrupt(timestamp_t timestamp);
  52. /** Disable low power ticker interrupt
  53. *
  54. */
  55. void lp_ticker_disable_interrupt(void);
  56. /** Clear the low power ticker interrupt
  57. *
  58. */
  59. void lp_ticker_clear_interrupt(void);
  60. /**@}*/
  61. #ifdef __cplusplus
  62. }
  63. #endif
  64. #endif
  65. #endif