Files
Embedded-System-Projects/Project_3_Dynamic_Controller/include/digital_in.h
T

22 lines
306 B
C++

#ifndef DIGITAL_IN_H
#define DIGITAL_IN_H
#include <stdint.h>
class Digital_in
{
public:
// pin is the PORTB bit number:
// PB0 = D8, PB1 = D9, ..., PB5 = D13
Digital_in(uint8_t pin);
void init();
bool is_hi() const;
bool is_lo() const;
private:
uint8_t pinMask;
};
#endif