nothing works, 2 mosfets died...

This commit is contained in:
Edward Emelianov
2024-03-05 15:35:34 +03:00
parent 1ecea45cc0
commit c6e8347d23
8 changed files with 84 additions and 20 deletions

View File

@@ -42,6 +42,15 @@ typedef enum{
EVT_RELEASE // released
} keyevent;
typedef struct{
keyevent event; // current key event
int16_t counter; // press/release milliseconds counter
GPIO_TypeDef *port; // key port
uint16_t pin; // key pin
uint8_t changed : 1; // the event have been changed
uint8_t inverted : 1; // button inverted: 0 - passive, 1 - active
} keybase;
//extern uint32_t lastUnsleep; // last keys activity time
int process_keys();