This repository has been archived on 2024-01-25. You can view files and clone it, but cannot push or open issues or pull requests.
SummerSchool2-Controller/306-controller_interface.X/board/button/button.h

26 lines
429 B
C
Raw Normal View History

2023-08-22 07:22:00 +00:00
#ifndef Button_ONCE
#define Button_ONCE
#include <stdint.h>
#include <stdbool.h>
/*
* this is the declaration of the Button class
*/
struct Button_
{
uint8_t id;
bool isPullUp;
};
typedef struct Button_ Button;
void Button_init(Button* me, uint8_t id, bool isPullUp);
void Button_initHW(Button* me);
uint8_t Button_read(Button* me);
void Button_setId(Button* me, uint8_t id);
uint8_t Button_getId(Button* me);
#endif