2018-09-25 02:41:58 +00:00
|
|
|
#include <avr/interrupt.h>
|
|
|
|
#include "queue.h"
|
|
|
|
#include "pinio.h"
|
|
|
|
#include "serial.h"
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#ifdef INVERT_DIRECTION_ENCODER
|
|
|
|
#define direction_encoder() (READ(ENCODER_PIN_B)?1:0)
|
|
|
|
#else
|
|
|
|
#define direction_encoder() (READ(ENCODER_PIN_B)?0:1)
|
|
|
|
#endif
|
|
|
|
|
2018-10-13 20:19:06 +00:00
|
|
|
extern int16_t desired_speed;
|
|
|
|
void stop_dc_motor();
|
|
|
|
|
2018-09-25 02:41:58 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
void sensing_init();
|
2018-10-13 20:19:06 +00:00
|
|
|
void update_dc_motor();
|
2018-09-25 02:41:58 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|