feat: 增加vl53l0x驱动
This commit is contained in:
11
app/by_led.c
Normal file
11
app/by_led.c
Normal 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
8
app/by_led.h
Normal 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
|
||||
Reference in New Issue
Block a user