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.
23 lines
681 B
23 lines
681 B
#pragma once
|
|
#include <stdio.h>
|
|
|
|
#include "basic_h/basic.hpp"
|
|
//
|
|
#include "clock.hpp"
|
|
|
|
extern "C" {
|
|
GPIO_TypeDef* chip_get_gpio(Pin_t pin);
|
|
const char* chip_gpio_group_get_name(GPIO_TypeDef* gpio_group);
|
|
uint16_t chip_get_pinoff(Pin_t pin);
|
|
const char* chip_pinoff_get_name(uint16_t pinoff);
|
|
|
|
const char* chip_tim_get_name(TIM_TypeDef* tim);
|
|
|
|
void chip_critical_enter(void);
|
|
void chip_critical_exit(void);
|
|
|
|
uint32_t chip_get_timer_clock_sorce_freq(TIM_HandleTypeDef* tim);
|
|
bool chip_calculate_prescaler_and_autoreload_by_expect_freq(uint32_t timerInClk, float infreqhz, uint32_t* prescaler, uint32_t* autoreload);
|
|
|
|
IRQn_Type chip_tim_get_irq(TIM_HandleTypeDef* tim);
|
|
}
|