Khangai Robot Play - Naive
01
THe naive play of the Khangai Robot
a4988.h
Go to the documentation of this file.
1
/*
2
* a4988.h
3
*
4
* Created : 11/14/2018
5
* Author : n-is
6
* email : 073bex422.nischal@pcampus.edu.np
7
*/
8
9
#ifndef _A4988_H_
10
#define _A4988_H_
11
12
#include "
periphs/tim.h
"
13
#include "
periphs/gpio.h
"
14
15
struct
A4988
16
{
17
uint32_t
steps_per_rev
;
18
GPIO_TypeDef *
dir_port
, *
step_port
;
19
uint32_t
dir_pin
,
step_pin
;
20
float
omega
;
21
};
22
23
void
A4988_setDirection
(
A4988
*stepper, uint32_t dir);
24
void
A4988_toggleDirection
(
A4988
*stepper);
25
26
void
A4988_step
(
A4988
*stepper);
27
28
#endif // !_A4988_H_
A4988_setDirection
void A4988_setDirection(A4988 *stepper, uint32_t dir)
Definition:
a4988.cpp:11
A4988::step_port
GPIO_TypeDef * step_port
Definition:
a4988.h:18
gpio.h
A4988::omega
float omega
Definition:
a4988.h:20
A4988_toggleDirection
void A4988_toggleDirection(A4988 *stepper)
Definition:
a4988.cpp:21
tim.h
A4988::step_pin
uint32_t step_pin
Definition:
a4988.h:19
A4988::steps_per_rev
uint32_t steps_per_rev
Definition:
a4988.h:17
A4988
Definition:
a4988.h:15
A4988::dir_port
GPIO_TypeDef * dir_port
Definition:
a4988.h:18
A4988::dir_pin
uint32_t dir_pin
Definition:
a4988.h:19
A4988_step
void A4988_step(A4988 *stepper)
Definition:
a4988.cpp:26
Core
Inc
devs
a4988.h
Generated by
1.8.15