#ifndef MENU_INTERFACE_H
#define MENU_INTERFACE_H

#include "stm32f1xx_hal.h"
#include "general_gpio.h"
#include "main.h"

#define GPIO_CONTROL //comment for control from watch window

#define GPIO_SwTheme						SW_THEME_GPIO_Port
#define GPIO_Pin_SwTheme				SW_THEME_Pin

#define GPIO_SwSpeed						SW_SPEED_GPIO_Port
#define GPIO_Pin_SwSpeed				SW_SPEED_Pin

#define GPIO_SwForward					SW_FORWARD_GPIO_Port
#define GPIO_Pin_SwForward			SW_FORWARD_Pin

#define GPIO_SwPlay							SW_PLAY_GPIO_Port
#define GPIO_Pin_SwPlay					SW_PLAY_Pin

#define GPIO_SwBackward					SW_BACKWARD_GPIO_Port
#define GPIO_Pin_SwBackward			SW_BACKWARD_Pin

#define GPIO_SwLoop							SW_LOOP_GPIO_Port
#define GPIO_Pin_SwLoop					SW_LOOP_Pin

typedef struct
{
	unsigned 	play:1;
	unsigned 	loop:1;
	unsigned 	pressed_start:1;
	unsigned 	pressed_forward:1;
	unsigned 	pressed_backward:1;
	float			currenttime;
	float			speed;
	
	
	GPIO_SwitchTypeDef	SwTheme;
	GPIO_SwitchTypeDef	SwPlay;
	GPIO_SwitchTypeDef	SwForward;
	GPIO_SwitchTypeDef	SwBackward;
	GPIO_SwitchTypeDef	SwSpeed;
	GPIO_SwitchTypeDef	SwLoop;
}PlayerTypeDef;
extern PlayerTypeDef Player;


void Menu_Control_Init(PlayerTypeDef *player);
void Menu_Control_ReadGPIO(PlayerTypeDef *player);
void Menu_Control_Music(PlayerTypeDef *player);

#endif //MENU_INTERFACE_H
