WIP: keep local changes before merging remote

This commit is contained in:
Filipriec
2025-11-13 14:42:47 +01:00
parent 915c573b27
commit 3c11e1dff8
9 changed files with 320 additions and 47 deletions

31
cvicenie_5/Button.h Normal file
View File

@@ -0,0 +1,31 @@
#ifndef __BUTTON_H
#define __BUTTON_H
#include "mbed.h"
// class Led
class Button
{
private:
void interrupt();
public:
//! Constructor
Button(PinName pin);
//! Destructor
~Button();
// get value
bool read(void);
bool wasPressed(void);
// get number of button pressed
uint16_t getCount(void);
private:
InterruptIn button;
volatile bool pressed;
volatile uint16_t counter;
};
#endif