Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
HBridge.cpp
- Committer:
- Issus
- Date:
- 2017-02-04
- Revision:
- 1:4d3738338cf1
- Parent:
- 0:617334d8e3bb
File content as of revision 1:4d3738338cf1:
#include "mbed.h" #include "HBridge.h" HBridge::HBridge(PinName i1, PinName i2): IN1(i1), IN2(i2) { } void HBridge::Coast() { IN1 = 0; IN2 = 0; } void HBridge::Forward() { IN1 = 1; IN2 = 0; } void HBridge::Reverse() { IN1 = 0; IN2 = 1; } void HBridge::Brake() { IN1 = 1; IN2 = 1; }