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.
24 lines
858 B
24 lines
858 B
#pragma once
|
|
#include <stdint.h>
|
|
|
|
#include "basic_h/basic.hpp"
|
|
|
|
extern "C" {
|
|
// 微秒延迟定时器,注意该延时定时器需要按照以下文档进行配置
|
|
// http://192.168.1.3:3000/zwikipedia/iflytop_wikipedia/src/branch/master/doc/stm32cubemx_us_timer.md
|
|
|
|
typedef struct {
|
|
zchip_tim_t* usdleaytim;
|
|
} zchip_clock_cfg_t;
|
|
|
|
uint32_t zchip_clock_init(zchip_clock_cfg_t* cfg);
|
|
|
|
uint32_t zchip_clock_get_ticket(void);
|
|
uint32_t zchip_clock_hasspassed(uint32_t ticket);
|
|
void zchip_clock_early_delayus(uint32_t us);
|
|
|
|
void zchip_clock_early_delayus2(uint32_t us) __attribute__((optimize("O2")));
|
|
void zchip_clock_early_delayus_timer_start() __attribute__((optimize("O2")));
|
|
uint32_t zchip_clock_early_delayus_timer_haspassed() __attribute__((optimize("O2")));
|
|
void zchip_clock_early_delayus_timer_stop() __attribute__((optimize("O2")));
|
|
}
|