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.

22 lines
681 B

1 year ago
  1. #pragma once
  2. #include <stdio.h>
  3. #include "basic_h/basic.hpp"
  4. //
  5. #include "clock.hpp"
  6. extern "C" {
  7. GPIO_TypeDef* chip_get_gpio(Pin_t pin);
  8. const char* chip_gpio_group_get_name(GPIO_TypeDef* gpio_group);
  9. uint16_t chip_get_pinoff(Pin_t pin);
  10. const char* chip_pinoff_get_name(uint16_t pinoff);
  11. const char* chip_tim_get_name(TIM_TypeDef* tim);
  12. void chip_critical_enter(void);
  13. void chip_critical_exit(void);
  14. uint32_t chip_get_timer_clock_sorce_freq(TIM_HandleTypeDef* tim);
  15. bool chip_calculate_prescaler_and_autoreload_by_expect_freq(uint32_t timerInClk, float infreqhz, uint32_t* prescaler, uint32_t* autoreload);
  16. IRQn_Type chip_tim_get_irq(TIM_HandleTypeDef* tim);
  17. }