MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
MeTouchSensor.h
Go to the documentation of this file.
1
40#ifndef MeTouchSensor_H
41#define MeTouchSensor_H
42
43#include <stdint.h>
44#include <stdbool.h>
45#include <Arduino.h>
46#include "MeConfig.h"
47
48#ifdef ME_PORT_DEFINED
49#include "MePort.h"
50#endif /* ME_PORT_DEFINED */
51
57#ifndef ME_PORT_DEFINED
58 class MeTouchSensor
59#else /* !ME_PORT_DEFINED */
60class MeTouchSensor : public MePort
61#endif // !ME_PORT_DEFINED
62{
63 public:
64#ifdef ME_PORT_DEFINED
71 MeTouchSensor(void);
72
78 MeTouchSensor(uint8_t port);
79#else // ME_PORT_DEFINED
88 MeTouchSensor(uint8_t TogPin, uint8_t OutputPin);
89#endif // ME_PORT_DEFINED
106 void setpin(uint8_t TogPin, uint8_t OutputPin);
107
120 bool touched(void);
121
136 void SetTogMode(uint8_t TogMode);
137 private:
138 volatile uint8_t _TogPin;
139 volatile uint8_t _OutputPin;
140};
141
142#endif
143
MeConfig.h
Configuration file of library.
MePort.h
Header for MePort.cpp module.
MePort
Port Mapping for RJ25.
Definition MePort.h:128
MeTouchSensor
Driver for Me touch sensor device.
Definition MeTouchSensor.h:62
MeTouchSensor::MeTouchSensor
MeTouchSensor(void)
Definition MeTouchSensor.cpp:51
MeTouchSensor::SetTogMode
void SetTogMode(uint8_t TogMode)
Definition MeTouchSensor.cpp:147
MeTouchSensor::touched
bool touched(void)
Definition MeTouchSensor.cpp:124