Start Programming

This commit is contained in:
2020-10-30 23:22:11 +01:00
parent 879ef241cb
commit 2a2ba7693e
10 changed files with 440 additions and 118 deletions
+26
View File
@@ -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);
}