feat: 增加vl53l0x驱动

This commit is contained in:
bmy
2024-05-11 19:51:10 +08:00
parent c3c1a7e7f0
commit 7c7e401665
46 changed files with 18455 additions and 112 deletions

11
app/by_led.c Normal file
View File

@@ -0,0 +1,11 @@
#include "by_led.h"
void by_led_set(uint8_t percent)
{
percent *= 10;
if (percent >= 1000) {
percent = 1000;
}
tmr_channel_value_set(TMR10, TMR_SELECT_CHANNEL_1, percent);
}

8
app/by_led.h Normal file
View File

@@ -0,0 +1,8 @@
#ifndef _BY_LED_H__
#define _BY_LED_H__
#include "at32f415.h"
extern void by_led_set(uint8_t percent);
#endif