stm32_freertos_template/hw/keys.h

34 lines
702 B
C

/* nazwa pliku: key.h
opis: Miernik C02
Odczyt klawiszy - nagłówek
*/
#ifndef __KEYS_H
#define __KEYS_H
#include <stdint.h>
//-----------------------------Stałe------------------------------//
//kody klawiszy
enum
{
KEYCODE_IDLE = 0,
KEYCODE_KEY1_SHORT = 1,
KEYCODE_KEY2_SHORT = 2,
KEYCODE_KEY1_LONG = 3,
KEYCODE_KEY2_LONG = 4,
KEYCODE_ENC1L = 5,
KEYCODE_ENC1R = 6,
KEYCODE_ENC2L = 7,
KEYCODE_ENC2R = 8
};
//-----------------------------Funkcje------------------------------//
void keys_Initialize (void);
void keys_Poll (void);
uint8_t keys_GetKeyCode (void);
void keys_ClearEvent (void);
#endif