Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
thk_motor_driver
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
thk_libs
microcontrollers
thk_motor_driver
Commits
3fdd2ef1
Commit
3fdd2ef1
authored
2 years ago
by
Orhan-Timo Altan
Browse files
Options
Downloads
Patches
Plain Diff
.
parent
e5374b22
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
thk_motor_driver_tb6612fng.cpp
+0
-2
0 additions, 2 deletions
thk_motor_driver_tb6612fng.cpp
thk_motor_driver_tb6612fng.h
+8
-9
8 additions, 9 deletions
thk_motor_driver_tb6612fng.h
with
8 additions
and
11 deletions
thk_motor_driver_tb6612fng.cpp
+
0
−
2
View file @
3fdd2ef1
#include
"thk_motor_driver_tb6612fng.h"
thk_MotorDriverTB6612FNG
::
thk_MotorDriverTB6612FNG
(){}
thk_MotorDriverTB6612FNG
::
thk_MotorDriverTB6612FNG
(
uint8_t
motor_count
,
uint8_t
pin_stby
,
uint8_t
pin_pwm_a
,
uint8_t
pin_in_1
,
uint8_t
pin_in_2
,
uint8_t
pin_pwm_b
,
uint8_t
pin_in_3
,
uint8_t
pin_in_4
)
:
motor_count
(
motor_count
),
pin_stby
(
pin_stby
),
pin_pwm_a
(
pin_pwm_a
),
pin_in_1
(
pin_in_1
),
pin_in_2
(
pin_in_2
),
pin_pwm_b
(
pin_pwm_b
),
pin_in_3
(
pin_in_3
),
pin_in_4
(
pin_in_4
){}
void
thk_MotorDriverTB6612FNG
::
init
()
...
...
This diff is collapsed.
Click to expand it.
thk_motor_driver_tb6612fng.h
+
8
−
9
View file @
3fdd2ef1
...
...
@@ -16,21 +16,20 @@
class
thk_MotorDriverTB6612FNG
:
public
thk_MotorDriver
{
public:
thk_MotorDriverTB6612FNG
();
thk_MotorDriverTB6612FNG
(
uint8_t
motor_count
,
uint8_t
pin_stby
,
uint8_t
pin_pwm_a
,
uint8_t
pin_in_1
,
uint8_t
pin_in_2
,
uint8_t
pin_pwm_b
,
uint8_t
pin_in_3
,
uint8_t
pin_in_4
);
void
stop
()
override
;
void
drive
(
uint8_t
speed
,
bool
is_forward
)
override
;
void
init
();
private:
uint8_t
motor_count
=
1
;
uint8_t
pin_stby
=
38
;
uint8_t
pin_pwm_a
=
6
;
uint8_t
pin_in_1
=
40
;
uint8_t
pin_in_2
=
42
;
uint8_t
pin_pwm_b
=
0
;
uint8_t
pin_in_3
=
0
;
uint8_t
pin_in_4
=
0
;
uint8_t
motor_count
;
uint8_t
pin_stby
;
uint8_t
pin_pwm_a
;
uint8_t
pin_in_1
;
uint8_t
pin_in_2
;
uint8_t
pin_pwm_b
;
uint8_t
pin_in_3
;
uint8_t
pin_in_4
;
};
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment