Start Programming
This commit is contained in:
@@ -13,6 +13,13 @@
|
||||
namespace blubblib {
|
||||
template <typename PortT, uint8_t Pin>
|
||||
struct pin {
|
||||
/**
|
||||
* \brief
|
||||
* Set or Unset the Output
|
||||
* \param value
|
||||
* true = set, false = unset
|
||||
* \return void
|
||||
*/
|
||||
static void Set(bool value = true) {
|
||||
if (value) {
|
||||
PortT::Port(PortT::Port() | (1<<Pin));
|
||||
@@ -58,6 +65,12 @@ namespace blubblib {
|
||||
Clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief
|
||||
* Set Output and Low
|
||||
*
|
||||
* \return void
|
||||
*/
|
||||
static void MakeLow() {
|
||||
Clear();
|
||||
Output(true);
|
||||
@@ -72,10 +85,23 @@ namespace blubblib {
|
||||
Set(value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief
|
||||
* Set High
|
||||
*
|
||||
* \return void
|
||||
*/
|
||||
static void SetHigh() {
|
||||
Set(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief
|
||||
* Set Low
|
||||
*
|
||||
* \return void
|
||||
*/
|
||||
static void SetLow() {
|
||||
Set(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user