key.h 576 Bytes
/*
 * key.h
 *
 *  Created on: Oct 28, 2019
 *      Author: Hope
 */

#ifndef INC_HARDWARE_KEY_H_
#define INC_HARDWARE_KEY_H_

/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "stm32f0xx_hal_gpio.h"

/* key scan defines --------------------------------------------------------*/
#define KEY_read() HAL_GPIO_ReadPin(KEY_GPIO_Port, KEY_Pin)

/* Exported functions --------------------------------------------------------*/
extern uint8_t KEY_Scan(uint8_t mode);


#endif /* INC_HARDWARE_KEY_H_ */