Skip to content

Commit

Permalink
Remove pca9685 since ported to xmake-repo and make start of TB6612.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE committed Dec 22, 2023
1 parent 5d34b20 commit a64a4b7
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 30 deletions.
30 changes: 0 additions & 30 deletions app/raspberry_pi/repository/packages/p/pca9685/xmake.lua

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#ifndef TB6612_H
#define TB6612_H

#pragma once

#include "cppgpio.hpp"

namespace tb6612
{
class Motor
{
public:
Motor(
const int &direction_channel,
const int &pwn = 0,
const bool &offset = true) :
direction_channel(direction_channel),
pwm(pwm),
offset(offset),
forward_offset(offset),
backward_offset(!offset)
{
}

private:
const int direction_channel;
const int pwm;
const bool offset;

bool forward_offset;
bool backward_offset;

int speed = 0;
}
}

#endif
8 changes: 8 additions & 0 deletions app/raspberry_pi/repository/packages/t/tb6612/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package("tb6612")
add_deps("cppgpio")
set_sourcedir(path.join(os.scriptdir(), "tb6612"))
on_install(function (package)
local configs = {}
import("package.tools.xmake").install(package, configs)
end)
package_end()

0 comments on commit a64a4b7

Please sign in to comment.