feat: 新增编码器驱动

This commit is contained in:
bmy
2023-12-13 21:54:20 +08:00
parent eaa7cc0eea
commit ece70343e5
4 changed files with 179 additions and 203 deletions

15
app/by_peripheral_init.h Normal file
View File

@@ -0,0 +1,15 @@
#ifndef _BY_PERIPHERAL_INIT_H__
#define _BY_PERIPHERAL_INIT_H__
#include "stdio.h"
#include "ch32v30x.h"
#define POTATE_BUTTOM_PRESS 1
#define POTATE_BUTTOM_FOREWARD 2
#define POTATE_BUTTOM_BACKWARD 3
extern uint8_t potate_button;
extern void by_exit_init(void);
extern void by_gpio_init(void);
extern uint8_t by_get_pb_statu(void);
#endif