Naze32 clone with Frysky receiver
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

us_ticker_api.h 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* mbed Microcontroller Library
  2. * Copyright (c) 2006-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_US_TICKER_API_H
  17. #define MBED_US_TICKER_API_H
  18. #include <stdint.h>
  19. #include "ticker_api.h"
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. /**
  24. * \defgroup UsTicker Microseconds Ticker Functions
  25. * @{
  26. */
  27. /** Get ticker's data
  28. *
  29. * @return The low power ticker data
  30. */
  31. const ticker_data_t* get_us_ticker_data(void);
  32. /** The wrapper for ticker_irq_handler, to pass us ticker's data
  33. *
  34. */
  35. void us_ticker_irq_handler(void);
  36. /* HAL us ticker */
  37. /** Initialize the ticker
  38. *
  39. */
  40. void us_ticker_init(void);
  41. /** Read the current counter
  42. *
  43. * @return The current timer's counter value in microseconds
  44. */
  45. uint32_t us_ticker_read(void);
  46. /** Set interrupt for specified timestamp
  47. *
  48. * @param timestamp The time in microseconds to be set
  49. */
  50. void us_ticker_set_interrupt(timestamp_t timestamp);
  51. /** Disable us ticker interrupt
  52. *
  53. */
  54. void us_ticker_disable_interrupt(void);
  55. /** Clear us ticker interrupt
  56. *
  57. */
  58. void us_ticker_clear_interrupt(void);
  59. /**@}*/
  60. #ifdef __cplusplus
  61. }
  62. #endif
  63. #endif