27 lines
632 B
C
27 lines
632 B
C
#ifndef __MOTOR_IO_H__
|
|||
|
|
#define __MOTOR_IO_H__
|
||
|
|
|
||
|
|
#include "driver/gpio.h"
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
extern "C" {
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#define MOTOR_IO_PIN_14 GPIO_NUM_14
|
||
|
|
#define MOTOR_IO_PIN_47 GPIO_NUM_47
|
||
|
|
#define MOTOR_IO_TASK_STACK_SIZE 4096
|
||
|
|
#define MOTOR_IO_TASK_PRIORITY 8 // 优先级 ---
|
||
|
|
|
||
|
|
void motor_io_init(void);
|
||
|
|
int motor_io_get_level_14(void);
|
||
|
|
int motor_io_get_level_47(void);
|
||
|
|
void motor_io_get_levels(int *level_14, int *level_47);
|
||
|
|
void motor_io_set_stop_transition(int from_14, int from_47, int to_14, int to_47);
|
||
|
|
void motor_io_clear_stop_transition(void);
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
}
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#endif
|